vapi_server_sdk 0.3.0 → 0.5.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 (208) hide show
  1. checksums.yaml +4 -4
  2. data/lib/requests.rb +2 -2
  3. data/lib/types_export.rb +83 -12
  4. data/lib/vapi_server_sdk/analytics/client.rb +41 -26
  5. data/lib/vapi_server_sdk/assistants/client.rb +84 -84
  6. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_server_messages_item.rb +1 -0
  7. data/lib/vapi_server_sdk/blocks/client.rb +0 -70
  8. data/lib/vapi_server_sdk/calls/client.rb +110 -76
  9. data/lib/vapi_server_sdk/files/client.rb +0 -70
  10. data/lib/vapi_server_sdk/knowledge_bases/client.rb +0 -70
  11. data/lib/vapi_server_sdk/logs/client.rb +15 -46
  12. data/lib/vapi_server_sdk/logs/types/logging_controller_logs_delete_query_request_type.rb +12 -0
  13. data/lib/vapi_server_sdk/phone_numbers/client.rb +0 -70
  14. data/lib/vapi_server_sdk/squads/client.rb +136 -78
  15. data/lib/vapi_server_sdk/test_suite_runs/client.rb +328 -0
  16. data/lib/vapi_server_sdk/test_suite_runs/types/test_suite_run_controller_find_all_paginated_request_sort_order.rb +10 -0
  17. data/lib/vapi_server_sdk/test_suite_tests/client.rb +331 -0
  18. data/lib/vapi_server_sdk/test_suite_tests/types/test_suite_test_controller_create_request.rb +81 -0
  19. data/lib/vapi_server_sdk/test_suite_tests/types/test_suite_test_controller_find_all_paginated_request_sort_order.rb +10 -0
  20. data/lib/vapi_server_sdk/test_suite_tests/types/test_suite_test_controller_remove_response.rb +82 -0
  21. data/lib/vapi_server_sdk/test_suite_tests/types/test_suite_test_controller_update_request.rb +81 -0
  22. data/lib/vapi_server_sdk/test_suites/client.rb +338 -0
  23. data/lib/vapi_server_sdk/test_suites/types/test_suite_controller_find_all_paginated_request_sort_order.rb +10 -0
  24. data/lib/vapi_server_sdk/tools/client.rb +0 -70
  25. data/lib/vapi_server_sdk/types/ai_edge_condition.rb +55 -0
  26. data/lib/vapi_server_sdk/types/analytics_operation_column.rb +1 -0
  27. data/lib/vapi_server_sdk/types/analytics_operation_operation.rb +1 -0
  28. data/lib/vapi_server_sdk/types/analytics_query.rb +4 -3
  29. data/lib/vapi_server_sdk/types/analytics_query_table.rb +9 -0
  30. data/lib/vapi_server_sdk/types/api_request.rb +165 -0
  31. data/lib/vapi_server_sdk/types/api_request_method.rb +8 -0
  32. data/lib/vapi_server_sdk/types/api_request_mode.rb +10 -0
  33. data/lib/vapi_server_sdk/types/artifact.rb +12 -2
  34. data/lib/vapi_server_sdk/types/artifact_plan.rb +56 -8
  35. data/lib/vapi_server_sdk/types/assistant.rb +27 -13
  36. data/lib/vapi_server_sdk/types/assistant_hook_action_base.rb +47 -0
  37. data/lib/vapi_server_sdk/types/assistant_hook_filter.rb +72 -0
  38. data/lib/vapi_server_sdk/types/assistant_hooks.rb +82 -0
  39. data/lib/vapi_server_sdk/types/assistant_overrides.rb +28 -14
  40. data/lib/vapi_server_sdk/types/assistant_overrides_server_messages_item.rb +1 -0
  41. data/lib/vapi_server_sdk/types/assistant_server_messages_item.rb +1 -0
  42. data/lib/vapi_server_sdk/types/azure_credential_region.rb +4 -2
  43. data/lib/vapi_server_sdk/types/azure_open_ai_credential_models_item.rb +1 -0
  44. data/lib/vapi_server_sdk/types/azure_open_ai_credential_region.rb +4 -2
  45. data/lib/vapi_server_sdk/types/backoff_plan.rb +80 -0
  46. data/lib/vapi_server_sdk/types/bash_tool_with_tool_call.rb +175 -0
  47. data/lib/vapi_server_sdk/types/bash_tool_with_tool_call_messages_item.rb +120 -0
  48. data/lib/vapi_server_sdk/types/byo_phone_number.rb +10 -1
  49. data/lib/vapi_server_sdk/types/byo_phone_number_status.rb +10 -0
  50. data/lib/vapi_server_sdk/types/call_ended_reason.rb +10 -1
  51. data/lib/vapi_server_sdk/types/cartesia_experimental_controls.rb +69 -0
  52. data/lib/vapi_server_sdk/types/cartesia_experimental_controls_emotion.rb +26 -0
  53. data/lib/vapi_server_sdk/types/cartesia_experimental_controls_speed.rb +11 -0
  54. data/lib/vapi_server_sdk/types/cartesia_voice.rb +24 -10
  55. data/lib/vapi_server_sdk/types/chat_completion_message.rb +80 -0
  56. data/lib/vapi_server_sdk/types/chat_completion_message_metadata.rb +94 -0
  57. data/lib/vapi_server_sdk/types/chat_completions_dto.rb +84 -0
  58. data/lib/vapi_server_sdk/types/client_inbound_message_end_call.rb +47 -0
  59. data/lib/vapi_server_sdk/types/client_inbound_message_message.rb +13 -0
  60. data/lib/vapi_server_sdk/types/client_inbound_message_transfer.rb +13 -3
  61. data/lib/vapi_server_sdk/types/client_message_conversation_update.rb +15 -2
  62. data/lib/vapi_server_sdk/types/client_message_hang.rb +22 -4
  63. data/lib/vapi_server_sdk/types/client_message_language_change_detected.rb +15 -3
  64. data/lib/vapi_server_sdk/types/client_message_message.rb +165 -181
  65. data/lib/vapi_server_sdk/types/client_message_metadata.rb +15 -3
  66. data/lib/vapi_server_sdk/types/client_message_model_output.rb +15 -3
  67. data/lib/vapi_server_sdk/types/client_message_speech_update.rb +11 -2
  68. data/lib/vapi_server_sdk/types/client_message_tool_calls.rb +15 -2
  69. data/lib/vapi_server_sdk/types/client_message_tool_calls_result.rb +15 -3
  70. data/lib/vapi_server_sdk/types/client_message_tool_calls_tool_with_tool_call_list_item.rb +116 -77
  71. data/lib/vapi_server_sdk/types/client_message_transcript.rb +12 -2
  72. data/lib/vapi_server_sdk/types/client_message_transcript_type.rb +10 -0
  73. data/lib/vapi_server_sdk/types/client_message_transfer_update.rb +11 -1
  74. data/lib/vapi_server_sdk/types/client_message_user_interrupted.rb +14 -4
  75. data/lib/vapi_server_sdk/types/client_message_voice_input.rb +15 -3
  76. data/lib/vapi_server_sdk/types/client_message_workflow_node_started.rb +67 -0
  77. data/lib/vapi_server_sdk/types/compliance_plan.rb +77 -0
  78. data/lib/vapi_server_sdk/types/computer_tool_with_tool_call.rb +199 -0
  79. data/lib/vapi_server_sdk/types/computer_tool_with_tool_call_messages_item.rb +120 -0
  80. data/lib/vapi_server_sdk/types/create_assistant_dto.rb +28 -14
  81. data/lib/vapi_server_sdk/types/create_assistant_dto_server_messages_item.rb +1 -0
  82. data/lib/vapi_server_sdk/types/create_azure_credential_dto_region.rb +4 -2
  83. data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto_models_item.rb +1 -0
  84. data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto_region.rb +4 -2
  85. data/lib/vapi_server_sdk/types/create_custom_knowledge_base_dto.rb +2 -4
  86. data/lib/vapi_server_sdk/types/create_test_suite_test_voice_dto.rb +90 -0
  87. data/lib/vapi_server_sdk/types/create_trieve_knowledge_base_dto.rb +34 -47
  88. data/lib/vapi_server_sdk/types/create_trieve_knowledge_base_dto_create_plan.rb +97 -0
  89. data/lib/vapi_server_sdk/types/create_vapi_phone_number_dto.rb +12 -4
  90. data/lib/vapi_server_sdk/types/create_workflow_dto.rb +80 -0
  91. data/lib/vapi_server_sdk/types/create_workflow_dto_nodes_item.rb +133 -0
  92. data/lib/vapi_server_sdk/types/custom_knowledge_base.rb +2 -4
  93. data/lib/vapi_server_sdk/types/deep_seek_model.rb +4 -3
  94. data/lib/vapi_server_sdk/types/deep_seek_model_model.rb +9 -0
  95. data/lib/vapi_server_sdk/types/deepgram_transcriber.rb +28 -2
  96. data/lib/vapi_server_sdk/types/deepgram_voice.rb +22 -2
  97. data/lib/vapi_server_sdk/types/edge.rb +87 -0
  98. data/lib/vapi_server_sdk/types/edge_condition.rb +107 -0
  99. data/lib/vapi_server_sdk/types/failed_edge_condition.rb +47 -0
  100. data/lib/vapi_server_sdk/types/fallback_cartesia_voice.rb +24 -9
  101. data/lib/vapi_server_sdk/types/fallback_deepgram_voice.rb +17 -2
  102. data/lib/vapi_server_sdk/types/fallback_play_ht_voice_model.rb +1 -0
  103. data/lib/vapi_server_sdk/types/fallback_rime_ai_voice_id_enum.rb +22 -20
  104. data/lib/vapi_server_sdk/types/fallback_rime_ai_voice_model.rb +1 -0
  105. data/lib/vapi_server_sdk/types/format_plan.rb +22 -2
  106. data/lib/vapi_server_sdk/types/format_plan_formatters_enabled_item.rb +22 -0
  107. data/lib/vapi_server_sdk/types/function_tool_with_tool_call.rb +1 -10
  108. data/lib/vapi_server_sdk/types/gather.rb +143 -0
  109. data/lib/vapi_server_sdk/types/ghl_tool_with_tool_call.rb +1 -9
  110. data/lib/vapi_server_sdk/types/google_model_model.rb +4 -0
  111. data/lib/vapi_server_sdk/types/groq_model_model.rb +1 -0
  112. data/lib/vapi_server_sdk/types/hangup.rb +67 -0
  113. data/lib/vapi_server_sdk/types/hook.rb +70 -0
  114. data/lib/vapi_server_sdk/types/hook_on.rb +9 -0
  115. data/lib/vapi_server_sdk/types/invite_user_dto.rb +11 -2
  116. data/lib/vapi_server_sdk/types/json_schema.rb +37 -2
  117. data/lib/vapi_server_sdk/types/log.rb +18 -18
  118. data/lib/vapi_server_sdk/types/logic_edge_condition.rb +55 -0
  119. data/lib/vapi_server_sdk/types/make_tool_with_tool_call.rb +1 -9
  120. data/lib/vapi_server_sdk/types/message_plan.rb +12 -2
  121. data/lib/vapi_server_sdk/types/open_ai_model.rb +1 -9
  122. data/lib/vapi_server_sdk/types/open_ai_model_fallback_models_item.rb +2 -0
  123. data/lib/vapi_server_sdk/types/open_ai_model_model.rb +2 -0
  124. data/lib/vapi_server_sdk/types/play_ht_voice_model.rb +1 -0
  125. data/lib/vapi_server_sdk/types/rime_ai_voice_id_enum.rb +22 -20
  126. data/lib/vapi_server_sdk/types/rime_ai_voice_model.rb +1 -0
  127. data/lib/vapi_server_sdk/types/say.rb +81 -0
  128. data/lib/vapi_server_sdk/types/say_hook.rb +81 -0
  129. data/lib/vapi_server_sdk/types/server.rb +17 -2
  130. data/lib/vapi_server_sdk/types/server_message_assistant_request.rb +12 -2
  131. data/lib/vapi_server_sdk/types/server_message_conversation_update.rb +12 -2
  132. data/lib/vapi_server_sdk/types/server_message_end_of_call_report.rb +11 -1
  133. data/lib/vapi_server_sdk/types/server_message_end_of_call_report_ended_reason.rb +10 -1
  134. data/lib/vapi_server_sdk/types/server_message_hang.rb +20 -2
  135. data/lib/vapi_server_sdk/types/server_message_knowledge_base_request.rb +14 -2
  136. data/lib/vapi_server_sdk/types/server_message_language_change_detected.rb +11 -1
  137. data/lib/vapi_server_sdk/types/server_message_message.rb +212 -237
  138. data/lib/vapi_server_sdk/types/server_message_model_output.rb +11 -1
  139. data/lib/vapi_server_sdk/types/server_message_phone_call_control.rb +18 -2
  140. data/lib/vapi_server_sdk/types/server_message_speech_update.rb +11 -1
  141. data/lib/vapi_server_sdk/types/server_message_status_update.rb +12 -2
  142. data/lib/vapi_server_sdk/types/server_message_status_update_ended_reason.rb +10 -1
  143. data/lib/vapi_server_sdk/types/server_message_tool_calls.rb +10 -2
  144. data/lib/vapi_server_sdk/types/server_message_tool_calls_tool_with_tool_call_list_item.rb +116 -77
  145. data/lib/vapi_server_sdk/types/server_message_transcript.rb +13 -2
  146. data/lib/vapi_server_sdk/types/server_message_transcript_type.rb +10 -0
  147. data/lib/vapi_server_sdk/types/server_message_transfer_destination_request.rb +12 -2
  148. data/lib/vapi_server_sdk/types/server_message_transfer_update.rb +11 -1
  149. data/lib/vapi_server_sdk/types/server_message_user_interrupted.rb +12 -2
  150. data/lib/vapi_server_sdk/types/server_message_voice_input.rb +11 -1
  151. data/lib/vapi_server_sdk/types/server_message_voice_request.rb +50 -2
  152. data/lib/vapi_server_sdk/types/stop_speaking_plan.rb +27 -2
  153. data/lib/vapi_server_sdk/types/subscription.rb +44 -14
  154. data/lib/vapi_server_sdk/types/sync_voice_library_dto_providers_item.rb +1 -0
  155. data/lib/vapi_server_sdk/types/test_suite.rb +104 -0
  156. data/lib/vapi_server_sdk/types/test_suite_run.rb +127 -0
  157. data/lib/vapi_server_sdk/types/test_suite_run_scorer_ai.rb +80 -0
  158. data/lib/vapi_server_sdk/types/test_suite_run_scorer_ai_result.rb +9 -0
  159. data/lib/vapi_server_sdk/types/test_suite_run_status.rb +10 -0
  160. data/lib/vapi_server_sdk/types/test_suite_run_test_attempt.rb +75 -0
  161. data/lib/vapi_server_sdk/types/{analytics_query_dto.rb → test_suite_run_test_attempt_call.rb} +19 -17
  162. data/lib/vapi_server_sdk/types/test_suite_run_test_result.rb +75 -0
  163. data/lib/vapi_server_sdk/types/test_suite_runs_paginated_response.rb +75 -0
  164. data/lib/vapi_server_sdk/types/test_suite_test_scorer_ai.rb +65 -0
  165. data/lib/vapi_server_sdk/types/test_suite_test_voice.rb +132 -0
  166. data/lib/vapi_server_sdk/types/test_suite_tests_paginated_response.rb +75 -0
  167. data/lib/vapi_server_sdk/types/test_suites_paginated_response.rb +75 -0
  168. data/lib/vapi_server_sdk/types/text_editor_tool_with_tool_call.rb +175 -0
  169. data/lib/vapi_server_sdk/types/text_editor_tool_with_tool_call_messages_item.rb +121 -0
  170. data/lib/vapi_server_sdk/types/time_range_step.rb +1 -0
  171. data/lib/vapi_server_sdk/types/tool_message_start.rb +18 -2
  172. data/lib/vapi_server_sdk/types/transfer.rb +74 -0
  173. data/lib/vapi_server_sdk/types/transfer_assistant_hook_action.rb +75 -0
  174. data/lib/vapi_server_sdk/types/{buy_phone_number_dto_fallback_destination.rb → transfer_assistant_hook_action_destination.rb} +9 -12
  175. data/lib/vapi_server_sdk/types/transfer_destination_assistant.rb +46 -0
  176. data/lib/vapi_server_sdk/types/transfer_plan.rb +37 -1
  177. data/lib/vapi_server_sdk/types/transfer_plan_mode.rb +4 -0
  178. data/lib/vapi_server_sdk/types/trieve_knowledge_base.rb +35 -44
  179. data/lib/vapi_server_sdk/types/{trieve_knowledge_base_vector_store_create_plan.rb → trieve_knowledge_base_chunk_plan.rb} +17 -11
  180. data/lib/vapi_server_sdk/types/trieve_knowledge_base_create.rb +59 -0
  181. data/lib/vapi_server_sdk/types/trieve_knowledge_base_create_plan.rb +96 -0
  182. data/lib/vapi_server_sdk/types/trieve_knowledge_base_import.rb +55 -0
  183. data/lib/vapi_server_sdk/types/{trieve_knowledge_base_vector_store_search_plan.rb → trieve_knowledge_base_search_plan.rb} +21 -12
  184. data/lib/vapi_server_sdk/types/{trieve_knowledge_base_vector_store_search_plan_search_type.rb → trieve_knowledge_base_search_plan_search_type.rb} +1 -1
  185. data/lib/vapi_server_sdk/types/twilio_phone_number.rb +11 -2
  186. data/lib/vapi_server_sdk/types/twilio_phone_number_status.rb +10 -0
  187. data/lib/vapi_server_sdk/types/update_azure_credential_dto_region.rb +4 -2
  188. data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto_models_item.rb +1 -0
  189. data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto_region.rb +4 -2
  190. data/lib/vapi_server_sdk/types/update_custom_knowledge_base_dto.rb +2 -4
  191. data/lib/vapi_server_sdk/types/update_test_suite_test_voice_dto.rb +90 -0
  192. data/lib/vapi_server_sdk/types/update_trieve_knowledge_base_dto.rb +34 -47
  193. data/lib/vapi_server_sdk/types/update_trieve_knowledge_base_dto_create_plan.rb +97 -0
  194. data/lib/vapi_server_sdk/types/vapi_model.rb +27 -1
  195. data/lib/vapi_server_sdk/types/vapi_phone_number.rb +29 -4
  196. data/lib/vapi_server_sdk/types/vapi_phone_number_status.rb +10 -0
  197. data/lib/vapi_server_sdk/types/vonage_phone_number.rb +11 -2
  198. data/lib/vapi_server_sdk/types/vonage_phone_number_status.rb +10 -0
  199. data/lib/vapi_server_sdk/types/workflow.rb +117 -0
  200. data/lib/vapi_server_sdk/types/workflow_nodes_item.rb +133 -0
  201. data/lib/vapi_server_sdk/types/xai_model.rb +4 -3
  202. data/lib/vapi_server_sdk/types/xai_model_model.rb +10 -0
  203. data/lib/vapi_server_sdk.rb +21 -0
  204. metadata +85 -11
  205. data/lib/vapi_server_sdk/types/buy_phone_number_dto.rb +0 -147
  206. data/lib/vapi_server_sdk/types/org_with_org_user.rb +0 -262
  207. data/lib/vapi_server_sdk/types/org_with_org_user_channel.rb +0 -10
  208. data/lib/vapi_server_sdk/types/org_with_org_user_role.rb +0 -9
@@ -38,13 +38,6 @@ module Vapi
38
38
  # specified value.
39
39
  # @param request_options [Vapi::RequestOptions]
40
40
  # @return [Array<Vapi::Tools::ToolsListResponseItem>]
41
- # @example
42
- # api = Vapi::Client.new(
43
- # base_url: "https://api.example.com",
44
- # environment: Vapi::Environment::DEFAULT,
45
- # token: "YOUR_AUTH_TOKEN"
46
- # )
47
- # api.tools.list
48
41
  def list(limit: nil, created_at_gt: nil, created_at_lt: nil, created_at_ge: nil, created_at_le: nil,
49
42
  updated_at_gt: nil, updated_at_lt: nil, updated_at_ge: nil, updated_at_le: nil, request_options: nil)
50
43
  response = @request_client.conn.get do |req|
@@ -82,13 +75,6 @@ module Vapi
82
75
  # @param request [Vapi::Tools::ToolsCreateRequest]
83
76
  # @param request_options [Vapi::RequestOptions]
84
77
  # @return [Vapi::Tools::ToolsCreateResponse]
85
- # @example
86
- # api = Vapi::Client.new(
87
- # base_url: "https://api.example.com",
88
- # environment: Vapi::Environment::DEFAULT,
89
- # token: "YOUR_AUTH_TOKEN"
90
- # )
91
- # api.tools.create
92
78
  def create(request:, request_options: nil)
93
79
  response = @request_client.conn.post do |req|
94
80
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -110,13 +96,6 @@ module Vapi
110
96
  # @param id [String]
111
97
  # @param request_options [Vapi::RequestOptions]
112
98
  # @return [Vapi::Tools::ToolsGetResponse]
113
- # @example
114
- # api = Vapi::Client.new(
115
- # base_url: "https://api.example.com",
116
- # environment: Vapi::Environment::DEFAULT,
117
- # token: "YOUR_AUTH_TOKEN"
118
- # )
119
- # api.tools.get(id: "id")
120
99
  def get(id:, request_options: nil)
121
100
  response = @request_client.conn.get do |req|
122
101
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -140,13 +119,6 @@ module Vapi
140
119
  # @param id [String]
141
120
  # @param request_options [Vapi::RequestOptions]
142
121
  # @return [Vapi::Tools::ToolsDeleteResponse]
143
- # @example
144
- # api = Vapi::Client.new(
145
- # base_url: "https://api.example.com",
146
- # environment: Vapi::Environment::DEFAULT,
147
- # token: "YOUR_AUTH_TOKEN"
148
- # )
149
- # api.tools.delete(id: "id")
150
122
  def delete(id:, request_options: nil)
151
123
  response = @request_client.conn.delete do |req|
152
124
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -171,13 +143,6 @@ module Vapi
171
143
  # @param request [Vapi::Tools::ToolsUpdateRequest]
172
144
  # @param request_options [Vapi::RequestOptions]
173
145
  # @return [Vapi::Tools::ToolsUpdateResponse]
174
- # @example
175
- # api = Vapi::Client.new(
176
- # base_url: "https://api.example.com",
177
- # environment: Vapi::Environment::DEFAULT,
178
- # token: "YOUR_AUTH_TOKEN"
179
- # )
180
- # api.tools.update(id: "id")
181
146
  def update(id:, request:, request_options: nil)
182
147
  response = @request_client.conn.patch do |req|
183
148
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -222,13 +187,6 @@ module Vapi
222
187
  # specified value.
223
188
  # @param request_options [Vapi::RequestOptions]
224
189
  # @return [Array<Vapi::Tools::ToolsListResponseItem>]
225
- # @example
226
- # api = Vapi::Client.new(
227
- # base_url: "https://api.example.com",
228
- # environment: Vapi::Environment::DEFAULT,
229
- # token: "YOUR_AUTH_TOKEN"
230
- # )
231
- # api.tools.list
232
190
  def list(limit: nil, created_at_gt: nil, created_at_lt: nil, created_at_ge: nil, created_at_le: nil,
233
191
  updated_at_gt: nil, updated_at_lt: nil, updated_at_ge: nil, updated_at_le: nil, request_options: nil)
234
192
  Async do
@@ -268,13 +226,6 @@ module Vapi
268
226
  # @param request [Vapi::Tools::ToolsCreateRequest]
269
227
  # @param request_options [Vapi::RequestOptions]
270
228
  # @return [Vapi::Tools::ToolsCreateResponse]
271
- # @example
272
- # api = Vapi::Client.new(
273
- # base_url: "https://api.example.com",
274
- # environment: Vapi::Environment::DEFAULT,
275
- # token: "YOUR_AUTH_TOKEN"
276
- # )
277
- # api.tools.create
278
229
  def create(request:, request_options: nil)
279
230
  Async do
280
231
  response = @request_client.conn.post do |req|
@@ -298,13 +249,6 @@ module Vapi
298
249
  # @param id [String]
299
250
  # @param request_options [Vapi::RequestOptions]
300
251
  # @return [Vapi::Tools::ToolsGetResponse]
301
- # @example
302
- # api = Vapi::Client.new(
303
- # base_url: "https://api.example.com",
304
- # environment: Vapi::Environment::DEFAULT,
305
- # token: "YOUR_AUTH_TOKEN"
306
- # )
307
- # api.tools.get(id: "id")
308
252
  def get(id:, request_options: nil)
309
253
  Async do
310
254
  response = @request_client.conn.get do |req|
@@ -330,13 +274,6 @@ module Vapi
330
274
  # @param id [String]
331
275
  # @param request_options [Vapi::RequestOptions]
332
276
  # @return [Vapi::Tools::ToolsDeleteResponse]
333
- # @example
334
- # api = Vapi::Client.new(
335
- # base_url: "https://api.example.com",
336
- # environment: Vapi::Environment::DEFAULT,
337
- # token: "YOUR_AUTH_TOKEN"
338
- # )
339
- # api.tools.delete(id: "id")
340
277
  def delete(id:, request_options: nil)
341
278
  Async do
342
279
  response = @request_client.conn.delete do |req|
@@ -363,13 +300,6 @@ module Vapi
363
300
  # @param request [Vapi::Tools::ToolsUpdateRequest]
364
301
  # @param request_options [Vapi::RequestOptions]
365
302
  # @return [Vapi::Tools::ToolsUpdateResponse]
366
- # @example
367
- # api = Vapi::Client.new(
368
- # base_url: "https://api.example.com",
369
- # environment: Vapi::Environment::DEFAULT,
370
- # token: "YOUR_AUTH_TOKEN"
371
- # )
372
- # api.tools.update(id: "id")
373
303
  def update(id:, request:, request_options: nil)
374
304
  Async do
375
305
  response = @request_client.conn.patch do |req|
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Vapi
7
+ class AiEdgeCondition
8
+ # @return [Array<String>]
9
+ attr_reader :matches
10
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
11
+ attr_reader :additional_properties
12
+ # @return [Object]
13
+ attr_reader :_field_set
14
+ protected :_field_set
15
+
16
+ OMIT = Object.new
17
+
18
+ # @param matches [Array<String>]
19
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
20
+ # @return [Vapi::AiEdgeCondition]
21
+ def initialize(matches:, additional_properties: nil)
22
+ @matches = matches
23
+ @additional_properties = additional_properties
24
+ @_field_set = { "matches": matches }
25
+ end
26
+
27
+ # Deserialize a JSON object to an instance of AiEdgeCondition
28
+ #
29
+ # @param json_object [String]
30
+ # @return [Vapi::AiEdgeCondition]
31
+ def self.from_json(json_object:)
32
+ struct = JSON.parse(json_object, object_class: OpenStruct)
33
+ parsed_json = JSON.parse(json_object)
34
+ matches = parsed_json["matches"]
35
+ new(matches: matches, additional_properties: struct)
36
+ end
37
+
38
+ # Serialize an instance of AiEdgeCondition to a JSON object
39
+ #
40
+ # @return [String]
41
+ def to_json(*_args)
42
+ @_field_set&.to_json
43
+ end
44
+
45
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
46
+ # hash and check each fields type against the current object's property
47
+ # definitions.
48
+ #
49
+ # @param obj [Object]
50
+ # @return [Void]
51
+ def self.validate_raw(obj:)
52
+ obj.matches.is_a?(Array) != false || raise("Passed value for field obj.matches is not the expected type, validation failed.")
53
+ end
54
+ end
55
+ end
@@ -13,5 +13,6 @@ module Vapi
13
13
  COST_BREAKDOWN_LLM_PROMPT_TOKENS = "costBreakdown.llmPromptTokens"
14
14
  COST_BREAKDOWN_LLM_COMPLETION_TOKENS = "costBreakdown.llmCompletionTokens"
15
15
  DURATION = "duration"
16
+ CONCURRENCY = "concurrency"
16
17
  end
17
18
  end
@@ -8,5 +8,6 @@ module Vapi
8
8
  COUNT = "count"
9
9
  MIN = "min"
10
10
  MAX = "max"
11
+ HISTORY = "history"
11
12
  end
12
13
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative "analytics_query_table"
3
4
  require_relative "analytics_query_group_by_item"
4
5
  require_relative "time_range"
5
6
  require_relative "analytics_operation"
@@ -8,7 +9,7 @@ require "json"
8
9
 
9
10
  module Vapi
10
11
  class AnalyticsQuery
11
- # @return [String] This is the table you want to query.
12
+ # @return [Vapi::AnalyticsQueryTable] This is the table you want to query.
12
13
  attr_reader :table
13
14
  # @return [Array<Vapi::AnalyticsQueryGroupByItem>] This is the list of columns you want to group by.
14
15
  attr_reader :group_by
@@ -27,7 +28,7 @@ module Vapi
27
28
 
28
29
  OMIT = Object.new
29
30
 
30
- # @param table [String] This is the table you want to query.
31
+ # @param table [Vapi::AnalyticsQueryTable] This is the table you want to query.
31
32
  # @param group_by [Array<Vapi::AnalyticsQueryGroupByItem>] This is the list of columns you want to group by.
32
33
  # @param name [String] This is the name of the query. This will be used to identify the query in the
33
34
  # response.
@@ -97,7 +98,7 @@ module Vapi
97
98
  # @param obj [Object]
98
99
  # @return [Void]
99
100
  def self.validate_raw(obj:)
100
- obj.table.is_a?(String) != false || raise("Passed value for field obj.table is not the expected type, validation failed.")
101
+ obj.table.is_a?(Vapi::AnalyticsQueryTable) != false || raise("Passed value for field obj.table is not the expected type, validation failed.")
101
102
  obj.group_by&.is_a?(Array) != false || raise("Passed value for field obj.group_by is not the expected type, validation failed.")
102
103
  obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
103
104
  obj.time_range.nil? || Vapi::TimeRange.validate_raw(obj: obj.time_range)
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vapi
4
+ # This is the table you want to query.
5
+ class AnalyticsQueryTable
6
+ CALL = "call"
7
+ SUBSCRIPTION = "subscription"
8
+ end
9
+ end
@@ -0,0 +1,165 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "api_request_method"
4
+ require_relative "json_schema"
5
+ require_relative "api_request_mode"
6
+ require_relative "hook"
7
+ require "ostruct"
8
+ require "json"
9
+
10
+ module Vapi
11
+ class ApiRequest
12
+ # @return [Vapi::ApiRequestMethod]
13
+ attr_reader :method
14
+ # @return [String] Api endpoint to send requests to.
15
+ attr_reader :url
16
+ # @return [Vapi::JsonSchema] These are the custom headers to include in the Api Request sent.
17
+ # Each key-value pair represents a header name and its value.
18
+ attr_reader :headers
19
+ # @return [Vapi::JsonSchema] This defined the JSON body of your Api Request. For example, if `body_schema`
20
+ # included "my_field": "my_gather_statement.user_age", then the json body sent to
21
+ # the server would have that particular value assign to it.
22
+ # Right now, only data from gather statements are supported.
23
+ attr_reader :body
24
+ # @return [Vapi::ApiRequestMode] This is the mode of the Api Request.
25
+ # We only support BLOCKING and BACKGROUND for now.
26
+ attr_reader :mode
27
+ # @return [Array<Vapi::Hook>] This is a list of hooks for a task.
28
+ # Each hook is a list of tasks to run on a trigger (such as on start, on failure,
29
+ # etc).
30
+ # Only Say is supported for now.
31
+ attr_reader :hooks
32
+ # @return [Vapi::JsonSchema] This is the schema for the outputs of the Api Request.
33
+ attr_reader :output
34
+ # @return [String]
35
+ attr_reader :name
36
+ # @return [Hash{String => Object}] This is for metadata you want to store on the task.
37
+ attr_reader :metadata
38
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
39
+ attr_reader :additional_properties
40
+ # @return [Object]
41
+ attr_reader :_field_set
42
+ protected :_field_set
43
+
44
+ OMIT = Object.new
45
+
46
+ # @param method [Vapi::ApiRequestMethod]
47
+ # @param url [String] Api endpoint to send requests to.
48
+ # @param headers [Vapi::JsonSchema] These are the custom headers to include in the Api Request sent.
49
+ # Each key-value pair represents a header name and its value.
50
+ # @param body [Vapi::JsonSchema] This defined the JSON body of your Api Request. For example, if `body_schema`
51
+ # included "my_field": "my_gather_statement.user_age", then the json body sent to
52
+ # the server would have that particular value assign to it.
53
+ # Right now, only data from gather statements are supported.
54
+ # @param mode [Vapi::ApiRequestMode] This is the mode of the Api Request.
55
+ # We only support BLOCKING and BACKGROUND for now.
56
+ # @param hooks [Array<Vapi::Hook>] This is a list of hooks for a task.
57
+ # Each hook is a list of tasks to run on a trigger (such as on start, on failure,
58
+ # etc).
59
+ # Only Say is supported for now.
60
+ # @param output [Vapi::JsonSchema] This is the schema for the outputs of the Api Request.
61
+ # @param name [String]
62
+ # @param metadata [Hash{String => Object}] This is for metadata you want to store on the task.
63
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
64
+ # @return [Vapi::ApiRequest]
65
+ def initialize(method:, url:, mode:, name:, headers: OMIT, body: OMIT, hooks: OMIT, output: OMIT, metadata: OMIT,
66
+ additional_properties: nil)
67
+ @method = method
68
+ @url = url
69
+ @headers = headers if headers != OMIT
70
+ @body = body if body != OMIT
71
+ @mode = mode
72
+ @hooks = hooks if hooks != OMIT
73
+ @output = output if output != OMIT
74
+ @name = name
75
+ @metadata = metadata if metadata != OMIT
76
+ @additional_properties = additional_properties
77
+ @_field_set = {
78
+ "method": method,
79
+ "url": url,
80
+ "headers": headers,
81
+ "body": body,
82
+ "mode": mode,
83
+ "hooks": hooks,
84
+ "output": output,
85
+ "name": name,
86
+ "metadata": metadata
87
+ }.reject do |_k, v|
88
+ v == OMIT
89
+ end
90
+ end
91
+
92
+ # Deserialize a JSON object to an instance of ApiRequest
93
+ #
94
+ # @param json_object [String]
95
+ # @return [Vapi::ApiRequest]
96
+ def self.from_json(json_object:)
97
+ struct = JSON.parse(json_object, object_class: OpenStruct)
98
+ parsed_json = JSON.parse(json_object)
99
+ method = parsed_json["method"]
100
+ url = parsed_json["url"]
101
+ if parsed_json["headers"].nil?
102
+ headers = nil
103
+ else
104
+ headers = parsed_json["headers"].to_json
105
+ headers = Vapi::JsonSchema.from_json(json_object: headers)
106
+ end
107
+ if parsed_json["body"].nil?
108
+ body = nil
109
+ else
110
+ body = parsed_json["body"].to_json
111
+ body = Vapi::JsonSchema.from_json(json_object: body)
112
+ end
113
+ mode = parsed_json["mode"]
114
+ hooks = parsed_json["hooks"]&.map do |item|
115
+ item = item.to_json
116
+ Vapi::Hook.from_json(json_object: item)
117
+ end
118
+ if parsed_json["output"].nil?
119
+ output = nil
120
+ else
121
+ output = parsed_json["output"].to_json
122
+ output = Vapi::JsonSchema.from_json(json_object: output)
123
+ end
124
+ name = parsed_json["name"]
125
+ metadata = parsed_json["metadata"]
126
+ new(
127
+ method: method,
128
+ url: url,
129
+ headers: headers,
130
+ body: body,
131
+ mode: mode,
132
+ hooks: hooks,
133
+ output: output,
134
+ name: name,
135
+ metadata: metadata,
136
+ additional_properties: struct
137
+ )
138
+ end
139
+
140
+ # Serialize an instance of ApiRequest to a JSON object
141
+ #
142
+ # @return [String]
143
+ def to_json(*_args)
144
+ @_field_set&.to_json
145
+ end
146
+
147
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
148
+ # hash and check each fields type against the current object's property
149
+ # definitions.
150
+ #
151
+ # @param obj [Object]
152
+ # @return [Void]
153
+ def self.validate_raw(obj:)
154
+ obj.method.is_a?(Vapi::ApiRequestMethod) != false || raise("Passed value for field obj.method is not the expected type, validation failed.")
155
+ obj.url.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
156
+ obj.headers.nil? || Vapi::JsonSchema.validate_raw(obj: obj.headers)
157
+ obj.body.nil? || Vapi::JsonSchema.validate_raw(obj: obj.body)
158
+ obj.mode.is_a?(Vapi::ApiRequestMode) != false || raise("Passed value for field obj.mode is not the expected type, validation failed.")
159
+ obj.hooks&.is_a?(Array) != false || raise("Passed value for field obj.hooks is not the expected type, validation failed.")
160
+ obj.output.nil? || Vapi::JsonSchema.validate_raw(obj: obj.output)
161
+ obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
162
+ obj.metadata&.is_a?(Hash) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
163
+ end
164
+ end
165
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vapi
4
+ class ApiRequestMethod
5
+ POST = "POST"
6
+ GET = "GET"
7
+ end
8
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vapi
4
+ # This is the mode of the Api Request.
5
+ # We only support BLOCKING and BACKGROUND for now.
6
+ class ApiRequestMode
7
+ BLOCKING = "blocking"
8
+ BACKGROUND = "background"
9
+ end
10
+ end
@@ -27,6 +27,9 @@ module Vapi
27
27
  # @return [String] This is the transcript of the call. This is derived from `artifact.messages` but
28
28
  # provided for convenience.
29
29
  attr_reader :transcript
30
+ # @return [String] This is the packet capture url for the call. This is only available for `phone`
31
+ # type calls where phone number's provider is `vapi` or `byo-phone-number`.
32
+ attr_reader :pcap_url
30
33
  # @return [OpenStruct] Additional properties unmapped to the current class definition
31
34
  attr_reader :additional_properties
32
35
  # @return [Object]
@@ -48,10 +51,12 @@ module Vapi
48
51
  # playback of the recording with artifact.messages timestamps.
49
52
  # @param transcript [String] This is the transcript of the call. This is derived from `artifact.messages` but
50
53
  # provided for convenience.
54
+ # @param pcap_url [String] This is the packet capture url for the call. This is only available for `phone`
55
+ # type calls where phone number's provider is `vapi` or `byo-phone-number`.
51
56
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
52
57
  # @return [Vapi::Artifact]
53
58
  def initialize(messages: OMIT, messages_open_ai_formatted: OMIT, recording_url: OMIT, stereo_recording_url: OMIT,
54
- video_recording_url: OMIT, video_recording_start_delay_seconds: OMIT, transcript: OMIT, additional_properties: nil)
59
+ video_recording_url: OMIT, video_recording_start_delay_seconds: OMIT, transcript: OMIT, pcap_url: OMIT, additional_properties: nil)
55
60
  @messages = messages if messages != OMIT
56
61
  @messages_open_ai_formatted = messages_open_ai_formatted if messages_open_ai_formatted != OMIT
57
62
  @recording_url = recording_url if recording_url != OMIT
@@ -61,6 +66,7 @@ module Vapi
61
66
  @video_recording_start_delay_seconds = video_recording_start_delay_seconds
62
67
  end
63
68
  @transcript = transcript if transcript != OMIT
69
+ @pcap_url = pcap_url if pcap_url != OMIT
64
70
  @additional_properties = additional_properties
65
71
  @_field_set = {
66
72
  "messages": messages,
@@ -69,7 +75,8 @@ module Vapi
69
75
  "stereoRecordingUrl": stereo_recording_url,
70
76
  "videoRecordingUrl": video_recording_url,
71
77
  "videoRecordingStartDelaySeconds": video_recording_start_delay_seconds,
72
- "transcript": transcript
78
+ "transcript": transcript,
79
+ "pcapUrl": pcap_url
73
80
  }.reject do |_k, v|
74
81
  v == OMIT
75
82
  end
@@ -95,6 +102,7 @@ module Vapi
95
102
  video_recording_url = parsed_json["videoRecordingUrl"]
96
103
  video_recording_start_delay_seconds = parsed_json["videoRecordingStartDelaySeconds"]
97
104
  transcript = parsed_json["transcript"]
105
+ pcap_url = parsed_json["pcapUrl"]
98
106
  new(
99
107
  messages: messages,
100
108
  messages_open_ai_formatted: messages_open_ai_formatted,
@@ -103,6 +111,7 @@ module Vapi
103
111
  video_recording_url: video_recording_url,
104
112
  video_recording_start_delay_seconds: video_recording_start_delay_seconds,
105
113
  transcript: transcript,
114
+ pcap_url: pcap_url,
106
115
  additional_properties: struct
107
116
  )
108
117
  end
@@ -128,6 +137,7 @@ module Vapi
128
137
  obj.video_recording_url&.is_a?(String) != false || raise("Passed value for field obj.video_recording_url is not the expected type, validation failed.")
129
138
  obj.video_recording_start_delay_seconds&.is_a?(Float) != false || raise("Passed value for field obj.video_recording_start_delay_seconds is not the expected type, validation failed.")
130
139
  obj.transcript&.is_a?(String) != false || raise("Passed value for field obj.transcript is not the expected type, validation failed.")
140
+ obj.pcap_url&.is_a?(String) != false || raise("Passed value for field obj.pcap_url is not the expected type, validation failed.")
131
141
  end
132
142
  end
133
143
  end
@@ -9,9 +9,10 @@ module Vapi
9
9
  # @return [Boolean] This determines whether assistant's calls are recorded. Defaults to true.
10
10
  # Usage:
11
11
  # - If you don't want to record the calls, set this to false.
12
- # - If you want to record the calls when `assistant.hipaaEnabled`, explicity set
13
- # this to true and make sure to provide S3 or GCP credentials on the Provider
14
- # Credentials page in the Dashboard.
12
+ # - If you want to record the calls when `assistant.hipaaEnabled` (deprecated) or
13
+ # `assistant.compliancePlan.hipaaEnabled` explicity set this to true and make sure
14
+ # to provide S3 or GCP credentials on the Provider Credentials page in the
15
+ # Dashboard.
15
16
  # You can find the recording at `call.artifact.recordingUrl` and
16
17
  # `call.artifact.stereoRecordingUrl` after the call is ended.
17
18
  # @default true
@@ -22,6 +23,25 @@ module Vapi
22
23
  # call is ended.
23
24
  # @default false
24
25
  attr_reader :video_recording_enabled
26
+ # @return [Boolean] This determines whether the SIP packet capture is enabled. Defaults to true.
27
+ # Only relevant for `phone` type calls where phone number's provider is `vapi` or
28
+ # `byo-phone-number`.
29
+ # You can find the packet capture at `call.artifact.pcapUrl` after the call is
30
+ # ended.
31
+ # @default true
32
+ attr_reader :pcap_enabled
33
+ # @return [String] This is the path where the SIP packet capture will be uploaded. This is only
34
+ # used if you have provided S3 or GCP credentials on the Provider Credentials page
35
+ # in the Dashboard.
36
+ # If credential.s3PathPrefix or credential.bucketPlan.path is set, this will
37
+ # append to it.
38
+ # Usage:
39
+ # - If you want to upload the packet capture to a specific path, set this to the
40
+ # path. Example: `/my-assistant-captures`.
41
+ # - If you want to upload the packet capture to the root of the bucket, set this
42
+ # to `/`.
43
+ # @default '/'
44
+ attr_reader :pcap_s_3_path_prefix
25
45
  # @return [Vapi::TranscriptPlan] This is the plan for `call.artifact.transcript`. To disable, set
26
46
  # `transcriptPlan.enabled` to false.
27
47
  attr_reader :transcript_plan
@@ -48,9 +68,10 @@ module Vapi
48
68
  # @param recording_enabled [Boolean] This determines whether assistant's calls are recorded. Defaults to true.
49
69
  # Usage:
50
70
  # - If you don't want to record the calls, set this to false.
51
- # - If you want to record the calls when `assistant.hipaaEnabled`, explicity set
52
- # this to true and make sure to provide S3 or GCP credentials on the Provider
53
- # Credentials page in the Dashboard.
71
+ # - If you want to record the calls when `assistant.hipaaEnabled` (deprecated) or
72
+ # `assistant.compliancePlan.hipaaEnabled` explicity set this to true and make sure
73
+ # to provide S3 or GCP credentials on the Provider Credentials page in the
74
+ # Dashboard.
54
75
  # You can find the recording at `call.artifact.recordingUrl` and
55
76
  # `call.artifact.stereoRecordingUrl` after the call is ended.
56
77
  # @default true
@@ -59,6 +80,23 @@ module Vapi
59
80
  # You can find the video recording at `call.artifact.videoRecordingUrl` after the
60
81
  # call is ended.
61
82
  # @default false
83
+ # @param pcap_enabled [Boolean] This determines whether the SIP packet capture is enabled. Defaults to true.
84
+ # Only relevant for `phone` type calls where phone number's provider is `vapi` or
85
+ # `byo-phone-number`.
86
+ # You can find the packet capture at `call.artifact.pcapUrl` after the call is
87
+ # ended.
88
+ # @default true
89
+ # @param pcap_s_3_path_prefix [String] This is the path where the SIP packet capture will be uploaded. This is only
90
+ # used if you have provided S3 or GCP credentials on the Provider Credentials page
91
+ # in the Dashboard.
92
+ # If credential.s3PathPrefix or credential.bucketPlan.path is set, this will
93
+ # append to it.
94
+ # Usage:
95
+ # - If you want to upload the packet capture to a specific path, set this to the
96
+ # path. Example: `/my-assistant-captures`.
97
+ # - If you want to upload the packet capture to the root of the bucket, set this
98
+ # to `/`.
99
+ # @default '/'
62
100
  # @param transcript_plan [Vapi::TranscriptPlan] This is the plan for `call.artifact.transcript`. To disable, set
63
101
  # `transcriptPlan.enabled` to false.
64
102
  # @param recording_path [String] This is the path where the recording will be uploaded. This is only used if you
@@ -74,16 +112,20 @@ module Vapi
74
112
  # @default '/'
75
113
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
76
114
  # @return [Vapi::ArtifactPlan]
77
- def initialize(recording_enabled: OMIT, video_recording_enabled: OMIT, transcript_plan: OMIT, recording_path: OMIT,
78
- additional_properties: nil)
115
+ def initialize(recording_enabled: OMIT, video_recording_enabled: OMIT, pcap_enabled: OMIT,
116
+ pcap_s_3_path_prefix: OMIT, transcript_plan: OMIT, recording_path: OMIT, additional_properties: nil)
79
117
  @recording_enabled = recording_enabled if recording_enabled != OMIT
80
118
  @video_recording_enabled = video_recording_enabled if video_recording_enabled != OMIT
119
+ @pcap_enabled = pcap_enabled if pcap_enabled != OMIT
120
+ @pcap_s_3_path_prefix = pcap_s_3_path_prefix if pcap_s_3_path_prefix != OMIT
81
121
  @transcript_plan = transcript_plan if transcript_plan != OMIT
82
122
  @recording_path = recording_path if recording_path != OMIT
83
123
  @additional_properties = additional_properties
84
124
  @_field_set = {
85
125
  "recordingEnabled": recording_enabled,
86
126
  "videoRecordingEnabled": video_recording_enabled,
127
+ "pcapEnabled": pcap_enabled,
128
+ "pcapS3PathPrefix": pcap_s_3_path_prefix,
87
129
  "transcriptPlan": transcript_plan,
88
130
  "recordingPath": recording_path
89
131
  }.reject do |_k, v|
@@ -100,6 +142,8 @@ module Vapi
100
142
  parsed_json = JSON.parse(json_object)
101
143
  recording_enabled = parsed_json["recordingEnabled"]
102
144
  video_recording_enabled = parsed_json["videoRecordingEnabled"]
145
+ pcap_enabled = parsed_json["pcapEnabled"]
146
+ pcap_s_3_path_prefix = parsed_json["pcapS3PathPrefix"]
103
147
  if parsed_json["transcriptPlan"].nil?
104
148
  transcript_plan = nil
105
149
  else
@@ -110,6 +154,8 @@ module Vapi
110
154
  new(
111
155
  recording_enabled: recording_enabled,
112
156
  video_recording_enabled: video_recording_enabled,
157
+ pcap_enabled: pcap_enabled,
158
+ pcap_s_3_path_prefix: pcap_s_3_path_prefix,
113
159
  transcript_plan: transcript_plan,
114
160
  recording_path: recording_path,
115
161
  additional_properties: struct
@@ -132,6 +178,8 @@ module Vapi
132
178
  def self.validate_raw(obj:)
133
179
  obj.recording_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.recording_enabled is not the expected type, validation failed.")
134
180
  obj.video_recording_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.video_recording_enabled is not the expected type, validation failed.")
181
+ obj.pcap_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.pcap_enabled is not the expected type, validation failed.")
182
+ obj.pcap_s_3_path_prefix&.is_a?(String) != false || raise("Passed value for field obj.pcap_s_3_path_prefix is not the expected type, validation failed.")
135
183
  obj.transcript_plan.nil? || Vapi::TranscriptPlan.validate_raw(obj: obj.transcript_plan)
136
184
  obj.recording_path&.is_a?(String) != false || raise("Passed value for field obj.recording_path is not the expected type, validation failed.")
137
185
  end