66require_relative "vapi_server_sdk/calls/client"
77require_relative "vapi_server_sdk/assistants/client"
88require_relative "vapi_server_sdk/phone_numbers/client"
9- require_relative "vapi_server_sdk/squads/client"
10- require_relative "vapi_server_sdk/knowledge_bases/client"
11- require_relative "vapi_server_sdk/blocks/client"
129require_relative "vapi_server_sdk/tools/client"
1310require_relative "vapi_server_sdk/files/client"
14- require_relative "vapi_server_sdk/analytics/client"
15- require_relative "vapi_server_sdk/logs/client"
11+ require_relative "vapi_server_sdk/knowledge_bases/client"
12+ require_relative "vapi_server_sdk/workflow/client"
13+ require_relative "vapi_server_sdk/squads/client"
1614require_relative "vapi_server_sdk/test_suites/client"
1715require_relative "vapi_server_sdk/test_suite_tests/client"
1816require_relative "vapi_server_sdk/test_suite_runs/client"
17+ require_relative "vapi_server_sdk/analytics/client"
18+ require_relative "vapi_server_sdk/logs/client"
1919
2020module Vapi
2121 class Client
@@ -25,26 +25,26 @@ class Client
2525 attr_reader :assistants
2626 # @return [Vapi::PhoneNumbersClient]
2727 attr_reader :phone_numbers
28- # @return [Vapi::SquadsClient]
29- attr_reader :squads
30- # @return [Vapi::KnowledgeBasesClient]
31- attr_reader :knowledge_bases
32- # @return [Vapi::BlocksClient]
33- attr_reader :blocks
3428 # @return [Vapi::ToolsClient]
3529 attr_reader :tools
3630 # @return [Vapi::FilesClient]
3731 attr_reader :files
38- # @return [Vapi::AnalyticsClient]
39- attr_reader :analytics
40- # @return [Vapi::LogsClient]
41- attr_reader :logs
32+ # @return [Vapi::KnowledgeBasesClient]
33+ attr_reader :knowledge_bases
34+ # @return [Vapi::WorkflowClient]
35+ attr_reader :workflow
36+ # @return [Vapi::SquadsClient]
37+ attr_reader :squads
4238 # @return [Vapi::TestSuitesClient]
4339 attr_reader :test_suites
4440 # @return [Vapi::TestSuiteTestsClient]
4541 attr_reader :test_suite_tests
4642 # @return [Vapi::TestSuiteRunsClient]
4743 attr_reader :test_suite_runs
44+ # @return [Vapi::AnalyticsClient]
45+ attr_reader :analytics
46+ # @return [Vapi::LogsClient]
47+ attr_reader :logs
4848
4949 # @param base_url [String]
5050 # @param environment [Vapi::Environment]
@@ -64,16 +64,37 @@ def initialize(token:, base_url: nil, environment: Vapi::Environment::DEFAULT, m
6464 @calls = Vapi ::CallsClient . new ( request_client : @request_client )
6565 @assistants = Vapi ::AssistantsClient . new ( request_client : @request_client )
6666 @phone_numbers = Vapi ::PhoneNumbersClient . new ( request_client : @request_client )
67- @squads = Vapi ::SquadsClient . new ( request_client : @request_client )
68- @knowledge_bases = Vapi ::KnowledgeBasesClient . new ( request_client : @request_client )
69- @blocks = Vapi ::BlocksClient . new ( request_client : @request_client )
7067 @tools = Vapi ::ToolsClient . new ( request_client : @request_client )
7168 @files = Vapi ::FilesClient . new ( request_client : @request_client )
72- @analytics = Vapi ::AnalyticsClient . new ( request_client : @request_client )
73- @logs = Vapi ::LogsClient . new ( request_client : @request_client )
69+ @knowledge_bases = Vapi ::KnowledgeBasesClient . new ( request_client : @request_client )
70+ @workflow = Vapi ::WorkflowClient . new ( request_client : @request_client )
71+ @squads = Vapi ::SquadsClient . new ( request_client : @request_client )
7472 @test_suites = Vapi ::TestSuitesClient . new ( request_client : @request_client )
7573 @test_suite_tests = Vapi ::TestSuiteTestsClient . new ( request_client : @request_client )
7674 @test_suite_runs = Vapi ::TestSuiteRunsClient . new ( request_client : @request_client )
75+ @analytics = Vapi ::AnalyticsClient . new ( request_client : @request_client )
76+ @logs = Vapi ::LogsClient . new ( request_client : @request_client )
77+ end
78+
79+ # @param request_options [Vapi::RequestOptions]
80+ # @return [Void]
81+ def prometheus_controller_index ( request_options : nil )
82+ @request_client . conn . get do |req |
83+ req . options . timeout = request_options . timeout_in_seconds unless request_options &.timeout_in_seconds . nil?
84+ req . headers [ "Authorization" ] = request_options . token unless request_options &.token . nil?
85+ req . headers = {
86+ **( req . headers || { } ) ,
87+ **@request_client . get_headers ,
88+ **( request_options &.additional_headers || { } )
89+ } . compact
90+ unless request_options . nil? || request_options &.additional_query_parameters . nil?
91+ req . params = { **( request_options &.additional_query_parameters || { } ) } . compact
92+ end
93+ unless request_options . nil? || request_options &.additional_body_parameters . nil?
94+ req . body = { **( request_options &.additional_body_parameters || { } ) } . compact
95+ end
96+ req . url "#{ @request_client . get_url ( request_options : request_options ) } /prometheus_metrics"
97+ end
7798 end
7899 end
79100
@@ -84,26 +105,26 @@ class AsyncClient
84105 attr_reader :assistants
85106 # @return [Vapi::AsyncPhoneNumbersClient]
86107 attr_reader :phone_numbers
87- # @return [Vapi::AsyncSquadsClient]
88- attr_reader :squads
89- # @return [Vapi::AsyncKnowledgeBasesClient]
90- attr_reader :knowledge_bases
91- # @return [Vapi::AsyncBlocksClient]
92- attr_reader :blocks
93108 # @return [Vapi::AsyncToolsClient]
94109 attr_reader :tools
95110 # @return [Vapi::AsyncFilesClient]
96111 attr_reader :files
97- # @return [Vapi::AsyncAnalyticsClient]
98- attr_reader :analytics
99- # @return [Vapi::AsyncLogsClient]
100- attr_reader :logs
112+ # @return [Vapi::AsyncKnowledgeBasesClient]
113+ attr_reader :knowledge_bases
114+ # @return [Vapi::AsyncWorkflowClient]
115+ attr_reader :workflow
116+ # @return [Vapi::AsyncSquadsClient]
117+ attr_reader :squads
101118 # @return [Vapi::AsyncTestSuitesClient]
102119 attr_reader :test_suites
103120 # @return [Vapi::AsyncTestSuiteTestsClient]
104121 attr_reader :test_suite_tests
105122 # @return [Vapi::AsyncTestSuiteRunsClient]
106123 attr_reader :test_suite_runs
124+ # @return [Vapi::AsyncAnalyticsClient]
125+ attr_reader :analytics
126+ # @return [Vapi::AsyncLogsClient]
127+ attr_reader :logs
107128
108129 # @param base_url [String]
109130 # @param environment [Vapi::Environment]
@@ -123,16 +144,37 @@ def initialize(token:, base_url: nil, environment: Vapi::Environment::DEFAULT, m
123144 @calls = Vapi ::AsyncCallsClient . new ( request_client : @async_request_client )
124145 @assistants = Vapi ::AsyncAssistantsClient . new ( request_client : @async_request_client )
125146 @phone_numbers = Vapi ::AsyncPhoneNumbersClient . new ( request_client : @async_request_client )
126- @squads = Vapi ::AsyncSquadsClient . new ( request_client : @async_request_client )
127- @knowledge_bases = Vapi ::AsyncKnowledgeBasesClient . new ( request_client : @async_request_client )
128- @blocks = Vapi ::AsyncBlocksClient . new ( request_client : @async_request_client )
129147 @tools = Vapi ::AsyncToolsClient . new ( request_client : @async_request_client )
130148 @files = Vapi ::AsyncFilesClient . new ( request_client : @async_request_client )
131- @analytics = Vapi ::AsyncAnalyticsClient . new ( request_client : @async_request_client )
132- @logs = Vapi ::AsyncLogsClient . new ( request_client : @async_request_client )
149+ @knowledge_bases = Vapi ::AsyncKnowledgeBasesClient . new ( request_client : @async_request_client )
150+ @workflow = Vapi ::AsyncWorkflowClient . new ( request_client : @async_request_client )
151+ @squads = Vapi ::AsyncSquadsClient . new ( request_client : @async_request_client )
133152 @test_suites = Vapi ::AsyncTestSuitesClient . new ( request_client : @async_request_client )
134153 @test_suite_tests = Vapi ::AsyncTestSuiteTestsClient . new ( request_client : @async_request_client )
135154 @test_suite_runs = Vapi ::AsyncTestSuiteRunsClient . new ( request_client : @async_request_client )
155+ @analytics = Vapi ::AsyncAnalyticsClient . new ( request_client : @async_request_client )
156+ @logs = Vapi ::AsyncLogsClient . new ( request_client : @async_request_client )
157+ end
158+
159+ # @param request_options [Vapi::RequestOptions]
160+ # @return [Void]
161+ def prometheus_controller_index ( request_options : nil )
162+ @async_request_client . conn . get do |req |
163+ req . options . timeout = request_options . timeout_in_seconds unless request_options &.timeout_in_seconds . nil?
164+ req . headers [ "Authorization" ] = request_options . token unless request_options &.token . nil?
165+ req . headers = {
166+ **( req . headers || { } ) ,
167+ **@async_request_client . get_headers ,
168+ **( request_options &.additional_headers || { } )
169+ } . compact
170+ unless request_options . nil? || request_options &.additional_query_parameters . nil?
171+ req . params = { **( request_options &.additional_query_parameters || { } ) } . compact
172+ end
173+ unless request_options . nil? || request_options &.additional_body_parameters . nil?
174+ req . body = { **( request_options &.additional_body_parameters || { } ) } . compact
175+ end
176+ req . url "#{ @async_request_client . get_url ( request_options : request_options ) } /prometheus_metrics"
177+ end
136178 end
137179 end
138180end
0 commit comments