Skip to content

Commit 731909a

Browse files
committed
Release 1.4.1
1 parent ee85522 commit 731909a

22 files changed

+79
-20
lines changed

pyproject.toml

+1-1
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 = "1.3.0"
6+
version = "1.4.1"
77
description = ""
88
readme = "README.md"
99
authors = []

src/vapi/core/client_wrapper.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ def __init__(
2020

2121
def get_headers(self) -> typing.Dict[str, str]:
2222
headers: typing.Dict[str, str] = {
23-
"User-Agent": "vapi_server_sdk/1.3.0",
23+
"User-Agent": "vapi_server_sdk/1.4.1",
2424
"X-Fern-Language": "Python",
2525
"X-Fern-SDK-Name": "vapi_server_sdk",
26-
"X-Fern-SDK-Version": "1.3.0",
26+
"X-Fern-SDK-Version": "1.4.1",
2727
}
2828
headers["Authorization"] = f"Bearer {self._get_token()}"
2929
return headers

src/vapi/types/byo_phone_number.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .byo_phone_number_fallback_destination import ByoPhoneNumberFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
import datetime as dt
1011
from .byo_phone_number_status import ByoPhoneNumberStatus
1112
from .server import Server
@@ -25,7 +26,7 @@ class ByoPhoneNumber(UncheckedBaseModel):
2526
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2627
"""
2728

28-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
29+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2930
"""
3031
This is the hooks that will be used for incoming calls to this phone number.
3132
"""

src/vapi/types/create_byo_phone_number_dto.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
from .server import Server
1011
from ..core.pydantic_utilities import IS_PYDANTIC_V2
1112

@@ -23,7 +24,7 @@ class CreateByoPhoneNumberDto(UncheckedBaseModel):
2324
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2425
"""
2526

26-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2728
"""
2829
This is the hooks that will be used for incoming calls to this phone number.
2930
"""

src/vapi/types/create_telnyx_phone_number_dto.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
from .server import Server
1011
from ..core.pydantic_utilities import IS_PYDANTIC_V2
1112

@@ -23,7 +24,7 @@ class CreateTelnyxPhoneNumberDto(UncheckedBaseModel):
2324
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2425
"""
2526

26-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2728
"""
2829
This is the hooks that will be used for incoming calls to this phone number.
2930
"""

src/vapi/types/create_twilio_phone_number_dto.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
from .server import Server
1011
from ..core.pydantic_utilities import IS_PYDANTIC_V2
1112

@@ -23,7 +24,7 @@ class CreateTwilioPhoneNumberDto(UncheckedBaseModel):
2324
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2425
"""
2526

26-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2728
"""
2829
This is the hooks that will be used for incoming calls to this phone number.
2930
"""

src/vapi/types/create_vapi_phone_number_dto.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
from .sip_authentication import SipAuthentication
1011
from .server import Server
1112
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -24,7 +25,7 @@ class CreateVapiPhoneNumberDto(UncheckedBaseModel):
2425
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2526
"""
2627

27-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
28+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2829
"""
2930
This is the hooks that will be used for incoming calls to this phone number.
3031
"""

src/vapi/types/create_vonage_phone_number_dto.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
from .server import Server
1011
from ..core.pydantic_utilities import IS_PYDANTIC_V2
1112

@@ -23,7 +24,7 @@ class CreateVonagePhoneNumberDto(UncheckedBaseModel):
2324
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2425
"""
2526

26-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2728
"""
2829
This is the hooks that will be used for incoming calls to this phone number.
2930
"""

src/vapi/types/import_twilio_phone_number_dto.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .import_twilio_phone_number_dto_fallback_destination import ImportTwilioPhoneNumberDtoFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
from .server import Server
1011
from ..core.pydantic_utilities import IS_PYDANTIC_V2
1112

@@ -23,7 +24,7 @@ class ImportTwilioPhoneNumberDto(UncheckedBaseModel):
2324
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2425
"""
2526

26-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2728
"""
2829
This is the hooks that will be used for incoming calls to this phone number.
2930
"""

src/vapi/types/import_vonage_phone_number_dto.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .import_vonage_phone_number_dto_fallback_destination import ImportVonagePhoneNumberDtoFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
from .server import Server
1011
from ..core.pydantic_utilities import IS_PYDANTIC_V2
1112

@@ -23,7 +24,7 @@ class ImportVonagePhoneNumberDto(UncheckedBaseModel):
2324
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2425
"""
2526

26-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2728
"""
2829
This is the hooks that will be used for incoming calls to this phone number.
2930
"""

src/vapi/types/message_plan.py

+9
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ class MessagePlan(UncheckedBaseModel):
3131
@default 3
3232
"""
3333

34+
idle_message_reset_count_on_user_speech_enabled: typing_extensions.Annotated[
35+
typing.Optional[bool], FieldMetadata(alias="idleMessageResetCountOnUserSpeechEnabled")
36+
] = pydantic.Field(default=None)
37+
"""
38+
This determines whether the idle message count is reset whenever the user speaks.
39+
40+
@default false
41+
"""
42+
3443
idle_timeout_seconds: typing_extensions.Annotated[
3544
typing.Optional[float], FieldMetadata(alias="idleTimeoutSeconds")
3645
] = pydantic.Field(default=None)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
from ..core.unchecked_base_model import UncheckedBaseModel
4+
import typing
5+
import pydantic
6+
from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem
7+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
8+
9+
10+
class PhoneNumberHookCallRinging(UncheckedBaseModel):
11+
on: typing.Literal["call.ringing"] = pydantic.Field(default="call.ringing")
12+
"""
13+
This is the event to trigger the hook on
14+
"""
15+
16+
do: typing.List[PhoneNumberHookCallRingingDoItem] = pydantic.Field()
17+
"""
18+
This is the set of actions to perform when the hook triggers
19+
"""
20+
21+
if IS_PYDANTIC_V2:
22+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
23+
else:
24+
25+
class Config:
26+
frozen = True
27+
smart_union = True
28+
extra = pydantic.Extra.allow
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
PhoneNumberHookCallRingingDoItem = typing.Union[typing.Optional[typing.Any]]

src/vapi/types/telnyx_phone_number.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .telnyx_phone_number_fallback_destination import TelnyxPhoneNumberFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
import datetime as dt
1011
from .telnyx_phone_number_status import TelnyxPhoneNumberStatus
1112
from .server import Server
@@ -25,7 +26,7 @@ class TelnyxPhoneNumber(UncheckedBaseModel):
2526
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2627
"""
2728

28-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
29+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2930
"""
3031
This is the hooks that will be used for incoming calls to this phone number.
3132
"""

src/vapi/types/twilio_phone_number.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .twilio_phone_number_fallback_destination import TwilioPhoneNumberFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
import datetime as dt
1011
from .twilio_phone_number_status import TwilioPhoneNumberStatus
1112
from .server import Server
@@ -25,7 +26,7 @@ class TwilioPhoneNumber(UncheckedBaseModel):
2526
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2627
"""
2728

28-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
29+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2930
"""
3031
This is the hooks that will be used for incoming calls to this phone number.
3132
"""

src/vapi/types/update_byo_phone_number_dto.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .update_byo_phone_number_dto_fallback_destination import UpdateByoPhoneNumberDtoFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
from .server import Server
1011
from ..core.pydantic_utilities import IS_PYDANTIC_V2
1112

@@ -23,7 +24,7 @@ class UpdateByoPhoneNumberDto(UncheckedBaseModel):
2324
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2425
"""
2526

26-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2728
"""
2829
This is the hooks that will be used for incoming calls to this phone number.
2930
"""

src/vapi/types/update_telnyx_phone_number_dto.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .update_telnyx_phone_number_dto_fallback_destination import UpdateTelnyxPhoneNumberDtoFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
from .server import Server
1011
from ..core.pydantic_utilities import IS_PYDANTIC_V2
1112

@@ -23,7 +24,7 @@ class UpdateTelnyxPhoneNumberDto(UncheckedBaseModel):
2324
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2425
"""
2526

26-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2728
"""
2829
This is the hooks that will be used for incoming calls to this phone number.
2930
"""

src/vapi/types/update_twilio_phone_number_dto.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .update_twilio_phone_number_dto_fallback_destination import UpdateTwilioPhoneNumberDtoFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
from .server import Server
1011
from ..core.pydantic_utilities import IS_PYDANTIC_V2
1112

@@ -23,7 +24,7 @@ class UpdateTwilioPhoneNumberDto(UncheckedBaseModel):
2324
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2425
"""
2526

26-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2728
"""
2829
This is the hooks that will be used for incoming calls to this phone number.
2930
"""

src/vapi/types/update_vapi_phone_number_dto.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .update_vapi_phone_number_dto_fallback_destination import UpdateVapiPhoneNumberDtoFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
from .server import Server
1011
from .sip_authentication import SipAuthentication
1112
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -24,7 +25,7 @@ class UpdateVapiPhoneNumberDto(UncheckedBaseModel):
2425
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2526
"""
2627

27-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
28+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2829
"""
2930
This is the hooks that will be used for incoming calls to this phone number.
3031
"""

src/vapi/types/update_vonage_phone_number_dto.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .update_vonage_phone_number_dto_fallback_destination import UpdateVonagePhoneNumberDtoFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
from .server import Server
1011
from ..core.pydantic_utilities import IS_PYDANTIC_V2
1112

@@ -23,7 +24,7 @@ class UpdateVonagePhoneNumberDto(UncheckedBaseModel):
2324
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2425
"""
2526

26-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2728
"""
2829
This is the hooks that will be used for incoming calls to this phone number.
2930
"""

src/vapi/types/vapi_phone_number.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .vapi_phone_number_fallback_destination import VapiPhoneNumberFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
import datetime as dt
1011
from .vapi_phone_number_status import VapiPhoneNumberStatus
1112
from .server import Server
@@ -26,7 +27,7 @@ class VapiPhoneNumber(UncheckedBaseModel):
2627
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2728
"""
2829

29-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
30+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
3031
"""
3132
This is the hooks that will be used for incoming calls to this phone number.
3233
"""

src/vapi/types/vonage_phone_number.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .vonage_phone_number_fallback_destination import VonagePhoneNumberFallbackDestination
77
from ..core.serialization import FieldMetadata
88
import pydantic
9+
from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
910
import datetime as dt
1011
from .vonage_phone_number_status import VonagePhoneNumberStatus
1112
from .server import Server
@@ -25,7 +26,7 @@ class VonagePhoneNumber(UncheckedBaseModel):
2526
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2627
"""
2728

28-
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
29+
hooks: typing.Optional[typing.List[PhoneNumberHookCallRinging]] = pydantic.Field(default=None)
2930
"""
3031
This is the hooks that will be used for incoming calls to this phone number.
3132
"""

0 commit comments

Comments
 (0)