77from .assistants .client import AssistantsClient , AsyncAssistantsClient
88from .calls .client import AsyncCallsClient , CallsClient
99from .core .client_wrapper import AsyncClientWrapper , SyncClientWrapper
10+ from .core .request_options import RequestOptions
1011from .environment import VapiEnvironment
1112from .files .client import AsyncFilesClient , FilesClient
1213from .knowledge_bases .client import AsyncKnowledgeBasesClient , KnowledgeBasesClient
1314from .logs .client import AsyncLogsClient , LogsClient
1415from .phone_numbers .client import AsyncPhoneNumbersClient , PhoneNumbersClient
16+ from .raw_client import AsyncRawVapi , RawVapi
1517from .squads .client import AsyncSquadsClient , SquadsClient
1618from .test_suite_runs .client import AsyncTestSuiteRunsClient , TestSuiteRunsClient
1719from .test_suite_tests .client import AsyncTestSuiteTestsClient , TestSuiteTestsClient
@@ -36,7 +38,7 @@ class Vapi:
3638
3739
3840
39- token : typing.Union[str, typing.Callable[[], str]]
41+ token : typing.Optional[typing. Union[str, typing.Callable[[], str] ]]
4042 timeout : typing.Optional[float]
4143 The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
4244
@@ -57,7 +59,7 @@ def __init__(
5759 * ,
5860 base_url : typing .Optional [str ] = None ,
5961 environment : VapiEnvironment = VapiEnvironment .DEFAULT ,
60- token : typing .Union [str , typing .Callable [[], str ]],
62+ token : typing .Optional [ typing . Union [str , typing .Callable [[], str ]]] = None ,
6163 timeout : typing .Optional [float ] = None ,
6264 follow_redirects : typing .Optional [bool ] = True ,
6365 httpx_client : typing .Optional [httpx .Client ] = None ,
@@ -75,6 +77,7 @@ def __init__(
7577 else httpx .Client (timeout = _defaulted_timeout ),
7678 timeout = _defaulted_timeout ,
7779 )
80+ self ._raw_client = RawVapi (client_wrapper = self ._client_wrapper )
7881 self .calls = CallsClient (client_wrapper = self ._client_wrapper )
7982 self .assistants = AssistantsClient (client_wrapper = self ._client_wrapper )
8083 self .phone_numbers = PhoneNumbersClient (client_wrapper = self ._client_wrapper )
@@ -89,6 +92,37 @@ def __init__(
8992 self .analytics = AnalyticsClient (client_wrapper = self ._client_wrapper )
9093 self .logs = LogsClient (client_wrapper = self ._client_wrapper )
9194
95+ @property
96+ def with_raw_response (self ) -> RawVapi :
97+ """
98+ Retrieves a raw implementation of this client that returns raw responses.
99+
100+ Returns
101+ -------
102+ RawVapi
103+ """
104+ return self ._raw_client
105+
106+ def prometheus_controller_index (self , * , request_options : typing .Optional [RequestOptions ] = None ) -> None :
107+ """
108+ Parameters
109+ ----------
110+ request_options : typing.Optional[RequestOptions]
111+ Request-specific configuration.
112+
113+ Returns
114+ -------
115+ None
116+
117+ Examples
118+ --------
119+ from vapi import Vapi
120+ client = Vapi(token="YOUR_TOKEN", )
121+ client.prometheus_controller_index()
122+ """
123+ _response = self ._raw_client .prometheus_controller_index (request_options = request_options )
124+ return _response .data
125+
92126
93127class AsyncVapi :
94128 """
@@ -106,7 +140,7 @@ class AsyncVapi:
106140
107141
108142
109- token : typing.Union[str, typing.Callable[[], str]]
143+ token : typing.Optional[typing. Union[str, typing.Callable[[], str] ]]
110144 timeout : typing.Optional[float]
111145 The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
112146
@@ -127,7 +161,7 @@ def __init__(
127161 * ,
128162 base_url : typing .Optional [str ] = None ,
129163 environment : VapiEnvironment = VapiEnvironment .DEFAULT ,
130- token : typing .Union [str , typing .Callable [[], str ]],
164+ token : typing .Optional [ typing . Union [str , typing .Callable [[], str ]]] = None ,
131165 timeout : typing .Optional [float ] = None ,
132166 follow_redirects : typing .Optional [bool ] = True ,
133167 httpx_client : typing .Optional [httpx .AsyncClient ] = None ,
@@ -145,6 +179,7 @@ def __init__(
145179 else httpx .AsyncClient (timeout = _defaulted_timeout ),
146180 timeout = _defaulted_timeout ,
147181 )
182+ self ._raw_client = AsyncRawVapi (client_wrapper = self ._client_wrapper )
148183 self .calls = AsyncCallsClient (client_wrapper = self ._client_wrapper )
149184 self .assistants = AsyncAssistantsClient (client_wrapper = self ._client_wrapper )
150185 self .phone_numbers = AsyncPhoneNumbersClient (client_wrapper = self ._client_wrapper )
@@ -159,6 +194,40 @@ def __init__(
159194 self .analytics = AsyncAnalyticsClient (client_wrapper = self ._client_wrapper )
160195 self .logs = AsyncLogsClient (client_wrapper = self ._client_wrapper )
161196
197+ @property
198+ def with_raw_response (self ) -> AsyncRawVapi :
199+ """
200+ Retrieves a raw implementation of this client that returns raw responses.
201+
202+ Returns
203+ -------
204+ AsyncRawVapi
205+ """
206+ return self ._raw_client
207+
208+ async def prometheus_controller_index (self , * , request_options : typing .Optional [RequestOptions ] = None ) -> None :
209+ """
210+ Parameters
211+ ----------
212+ request_options : typing.Optional[RequestOptions]
213+ Request-specific configuration.
214+
215+ Returns
216+ -------
217+ None
218+
219+ Examples
220+ --------
221+ from vapi import AsyncVapi
222+ import asyncio
223+ client = AsyncVapi(token="YOUR_TOKEN", )
224+ async def main() -> None:
225+ await client.prometheus_controller_index()
226+ asyncio.run(main())
227+ """
228+ _response = await self ._raw_client .prometheus_controller_index (request_options = request_options )
229+ return _response .data
230+
162231
163232def _get_base_url (* , base_url : typing .Optional [str ] = None , environment : VapiEnvironment ) -> str :
164233 if base_url is not None :
0 commit comments