Skip to content

Commit 19803cc

Browse files
committed
Release 0.6.2
1 parent 633e576 commit 19803cc

File tree

469 files changed

+1344
-1035
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

469 files changed

+1344
-1035
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "vapi_server_sdk"
33

44
[tool.poetry]
55
name = "vapi_server_sdk"
6-
version = "0.6.1"
6+
version = "0.6.2"
77
description = ""
88
readme = "README.md"
99
authors = []

src/vapi/analytics/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from ..core.request_options import RequestOptions
77
from ..types.analytics_query_result import AnalyticsQueryResult
88
from ..core.serialization import convert_and_respect_annotation_metadata
9-
from ..core.pydantic_utilities import parse_obj_as
9+
from ..core.unchecked_base_model import construct_type
1010
from json.decoder import JSONDecodeError
1111
from ..core.api_error import ApiError
1212
from ..core.client_wrapper import AsyncClientWrapper
@@ -54,7 +54,7 @@ def get(
5454
if 200 <= _response.status_code < 300:
5555
return typing.cast(
5656
typing.List[AnalyticsQueryResult],
57-
parse_obj_as(
57+
construct_type(
5858
type_=typing.List[AnalyticsQueryResult], # type: ignore
5959
object_=_response.json(),
6060
),
@@ -104,7 +104,7 @@ async def get(
104104
if 200 <= _response.status_code < 300:
105105
return typing.cast(
106106
typing.List[AnalyticsQueryResult],
107-
parse_obj_as(
107+
construct_type(
108108
type_=typing.List[AnalyticsQueryResult], # type: ignore
109109
object_=_response.json(),
110110
),

src/vapi/assistants/client.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from ..core.request_options import RequestOptions
77
from ..types.assistant import Assistant
88
from ..core.datetime_utils import serialize_datetime
9-
from ..core.pydantic_utilities import parse_obj_as
9+
from ..core.unchecked_base_model import construct_type
1010
from json.decoder import JSONDecodeError
1111
from ..core.api_error import ApiError
1212
from ..types.create_assistant_dto_transcriber import CreateAssistantDtoTranscriber
@@ -121,7 +121,7 @@ def list(
121121
if 200 <= _response.status_code < 300:
122122
return typing.cast(
123123
typing.List[Assistant],
124-
parse_obj_as(
124+
construct_type(
125125
type_=typing.List[Assistant], # type: ignore
126126
object_=_response.json(),
127127
),
@@ -403,7 +403,7 @@ def create(
403403
if 200 <= _response.status_code < 300:
404404
return typing.cast(
405405
Assistant,
406-
parse_obj_as(
406+
construct_type(
407407
type_=Assistant, # type: ignore
408408
object_=_response.json(),
409409
),
@@ -436,7 +436,7 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non
436436
if 200 <= _response.status_code < 300:
437437
return typing.cast(
438438
Assistant,
439-
parse_obj_as(
439+
construct_type(
440440
type_=Assistant, # type: ignore
441441
object_=_response.json(),
442442
),
@@ -469,7 +469,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] =
469469
if 200 <= _response.status_code < 300:
470470
return typing.cast(
471471
Assistant,
472-
parse_obj_as(
472+
construct_type(
473473
type_=Assistant, # type: ignore
474474
object_=_response.json(),
475475
),
@@ -757,7 +757,7 @@ def update(
757757
if 200 <= _response.status_code < 300:
758758
return typing.cast(
759759
Assistant,
760-
parse_obj_as(
760+
construct_type(
761761
type_=Assistant, # type: ignore
762762
object_=_response.json(),
763763
),
@@ -844,7 +844,7 @@ async def list(
844844
if 200 <= _response.status_code < 300:
845845
return typing.cast(
846846
typing.List[Assistant],
847-
parse_obj_as(
847+
construct_type(
848848
type_=typing.List[Assistant], # type: ignore
849849
object_=_response.json(),
850850
),
@@ -1126,7 +1126,7 @@ async def create(
11261126
if 200 <= _response.status_code < 300:
11271127
return typing.cast(
11281128
Assistant,
1129-
parse_obj_as(
1129+
construct_type(
11301130
type_=Assistant, # type: ignore
11311131
object_=_response.json(),
11321132
),
@@ -1159,7 +1159,7 @@ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions]
11591159
if 200 <= _response.status_code < 300:
11601160
return typing.cast(
11611161
Assistant,
1162-
parse_obj_as(
1162+
construct_type(
11631163
type_=Assistant, # type: ignore
11641164
object_=_response.json(),
11651165
),
@@ -1192,7 +1192,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio
11921192
if 200 <= _response.status_code < 300:
11931193
return typing.cast(
11941194
Assistant,
1195-
parse_obj_as(
1195+
construct_type(
11961196
type_=Assistant, # type: ignore
11971197
object_=_response.json(),
11981198
),
@@ -1480,7 +1480,7 @@ async def update(
14801480
if 200 <= _response.status_code < 300:
14811481
return typing.cast(
14821482
Assistant,
1483-
parse_obj_as(
1483+
construct_type(
14841484
type_=Assistant, # type: ignore
14851485
object_=_response.json(),
14861486
),

src/vapi/blocks/client.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from ..core.request_options import RequestOptions
77
from .types.blocks_list_response_item import BlocksListResponseItem
88
from ..core.datetime_utils import serialize_datetime
9-
from ..core.pydantic_utilities import parse_obj_as
9+
from ..core.unchecked_base_model import construct_type
1010
from json.decoder import JSONDecodeError
1111
from ..core.api_error import ApiError
1212
from .types.blocks_create_request import BlocksCreateRequest
@@ -99,7 +99,7 @@ def list(
9999
if 200 <= _response.status_code < 300:
100100
return typing.cast(
101101
typing.List[BlocksListResponseItem],
102-
parse_obj_as(
102+
construct_type(
103103
type_=typing.List[BlocksListResponseItem], # type: ignore
104104
object_=_response.json(),
105105
),
@@ -138,7 +138,7 @@ def create(
138138
if 200 <= _response.status_code < 300:
139139
return typing.cast(
140140
BlocksCreateResponse,
141-
parse_obj_as(
141+
construct_type(
142142
type_=BlocksCreateResponse, # type: ignore
143143
object_=_response.json(),
144144
),
@@ -171,7 +171,7 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non
171171
if 200 <= _response.status_code < 300:
172172
return typing.cast(
173173
BlocksGetResponse,
174-
parse_obj_as(
174+
construct_type(
175175
type_=BlocksGetResponse, # type: ignore
176176
object_=_response.json(),
177177
),
@@ -204,7 +204,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] =
204204
if 200 <= _response.status_code < 300:
205205
return typing.cast(
206206
BlocksDeleteResponse,
207-
parse_obj_as(
207+
construct_type(
208208
type_=BlocksDeleteResponse, # type: ignore
209209
object_=_response.json(),
210210
),
@@ -245,7 +245,7 @@ def update(
245245
if 200 <= _response.status_code < 300:
246246
return typing.cast(
247247
BlocksUpdateResponse,
248-
parse_obj_as(
248+
construct_type(
249249
type_=BlocksUpdateResponse, # type: ignore
250250
object_=_response.json(),
251251
),
@@ -332,7 +332,7 @@ async def list(
332332
if 200 <= _response.status_code < 300:
333333
return typing.cast(
334334
typing.List[BlocksListResponseItem],
335-
parse_obj_as(
335+
construct_type(
336336
type_=typing.List[BlocksListResponseItem], # type: ignore
337337
object_=_response.json(),
338338
),
@@ -371,7 +371,7 @@ async def create(
371371
if 200 <= _response.status_code < 300:
372372
return typing.cast(
373373
BlocksCreateResponse,
374-
parse_obj_as(
374+
construct_type(
375375
type_=BlocksCreateResponse, # type: ignore
376376
object_=_response.json(),
377377
),
@@ -404,7 +404,7 @@ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions]
404404
if 200 <= _response.status_code < 300:
405405
return typing.cast(
406406
BlocksGetResponse,
407-
parse_obj_as(
407+
construct_type(
408408
type_=BlocksGetResponse, # type: ignore
409409
object_=_response.json(),
410410
),
@@ -437,7 +437,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio
437437
if 200 <= _response.status_code < 300:
438438
return typing.cast(
439439
BlocksDeleteResponse,
440-
parse_obj_as(
440+
construct_type(
441441
type_=BlocksDeleteResponse, # type: ignore
442442
object_=_response.json(),
443443
),
@@ -478,7 +478,7 @@ async def update(
478478
if 200 <= _response.status_code < 300:
479479
return typing.cast(
480480
BlocksUpdateResponse,
481-
parse_obj_as(
481+
construct_type(
482482
type_=BlocksUpdateResponse, # type: ignore
483483
object_=_response.json(),
484484
),

src/vapi/calls/client.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from ..core.request_options import RequestOptions
77
from ..types.call import Call
88
from ..core.datetime_utils import serialize_datetime
9-
from ..core.pydantic_utilities import parse_obj_as
9+
from ..core.unchecked_base_model import construct_type
1010
from json.decoder import JSONDecodeError
1111
from ..core.api_error import ApiError
1212
from ..types.create_assistant_dto import CreateAssistantDto
@@ -115,7 +115,7 @@ def list(
115115
if 200 <= _response.status_code < 300:
116116
return typing.cast(
117117
typing.List[Call],
118-
parse_obj_as(
118+
construct_type(
119119
type_=typing.List[Call], # type: ignore
120120
object_=_response.json(),
121121
),
@@ -224,7 +224,7 @@ def create(
224224
if 200 <= _response.status_code < 300:
225225
return typing.cast(
226226
Call,
227-
parse_obj_as(
227+
construct_type(
228228
type_=Call, # type: ignore
229229
object_=_response.json(),
230230
),
@@ -257,7 +257,7 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non
257257
if 200 <= _response.status_code < 300:
258258
return typing.cast(
259259
Call,
260-
parse_obj_as(
260+
construct_type(
261261
type_=Call, # type: ignore
262262
object_=_response.json(),
263263
),
@@ -290,7 +290,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] =
290290
if 200 <= _response.status_code < 300:
291291
return typing.cast(
292292
Call,
293-
parse_obj_as(
293+
construct_type(
294294
type_=Call, # type: ignore
295295
object_=_response.json(),
296296
),
@@ -335,7 +335,7 @@ def update(
335335
if 200 <= _response.status_code < 300:
336336
return typing.cast(
337337
Call,
338-
parse_obj_as(
338+
construct_type(
339339
type_=Call, # type: ignore
340340
object_=_response.json(),
341341
),
@@ -439,7 +439,7 @@ async def list(
439439
if 200 <= _response.status_code < 300:
440440
return typing.cast(
441441
typing.List[Call],
442-
parse_obj_as(
442+
construct_type(
443443
type_=typing.List[Call], # type: ignore
444444
object_=_response.json(),
445445
),
@@ -548,7 +548,7 @@ async def create(
548548
if 200 <= _response.status_code < 300:
549549
return typing.cast(
550550
Call,
551-
parse_obj_as(
551+
construct_type(
552552
type_=Call, # type: ignore
553553
object_=_response.json(),
554554
),
@@ -581,7 +581,7 @@ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions]
581581
if 200 <= _response.status_code < 300:
582582
return typing.cast(
583583
Call,
584-
parse_obj_as(
584+
construct_type(
585585
type_=Call, # type: ignore
586586
object_=_response.json(),
587587
),
@@ -614,7 +614,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio
614614
if 200 <= _response.status_code < 300:
615615
return typing.cast(
616616
Call,
617-
parse_obj_as(
617+
construct_type(
618618
type_=Call, # type: ignore
619619
object_=_response.json(),
620620
),
@@ -659,7 +659,7 @@ async def update(
659659
if 200 <= _response.status_code < 300:
660660
return typing.cast(
661661
Call,
662-
parse_obj_as(
662+
construct_type(
663663
type_=Call, # type: ignore
664664
object_=_response.json(),
665665
),

src/vapi/core/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from .remove_none_from_dict import remove_none_from_dict
2121
from .request_options import RequestOptions
2222
from .serialization import FieldMetadata, convert_and_respect_annotation_metadata
23+
from .unchecked_base_model import UncheckedBaseModel, UnionMetadata, construct_type
2324

2425
__all__ = [
2526
"ApiError",
@@ -34,8 +35,11 @@
3435
"RequestOptions",
3536
"SyncClientWrapper",
3637
"SyncPager",
38+
"UncheckedBaseModel",
39+
"UnionMetadata",
3740
"UniversalBaseModel",
3841
"UniversalRootModel",
42+
"construct_type",
3943
"convert_and_respect_annotation_metadata",
4044
"convert_file_dict_to_httpx_tuples",
4145
"encode_query",

src/vapi/core/client_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def get_headers(self) -> typing.Dict[str, str]:
2222
headers: typing.Dict[str, str] = {
2323
"X-Fern-Language": "Python",
2424
"X-Fern-SDK-Name": "vapi_server_sdk",
25-
"X-Fern-SDK-Version": "0.6.1",
25+
"X-Fern-SDK-Version": "0.6.2",
2626
}
2727
headers["Authorization"] = f"Bearer {self._get_token()}"
2828
return headers

0 commit comments

Comments
 (0)