Skip to content

Commit c5c2e18

Browse files
committed
Release 1.2.1
1 parent 2a91807 commit c5c2e18

32 files changed

+245
-29
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 = "v0.5.1"
6+
version = "1.2.1"
77
description = ""
88
readme = "README.md"
99
authors = []

src/vapi/core/client_wrapper.py

+1-1
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": "v0.5.1",
25+
"X-Fern-SDK-Version": "1.2.1",
2626
}
2727
headers["Authorization"] = f"Bearer {self._get_token()}"
2828
return headers

src/vapi/types/byo_phone_number.py

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ class ByoPhoneNumber(UncheckedBaseModel):
2525
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2626
"""
2727

28+
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
29+
"""
30+
This is the hooks that will be used for incoming calls to this phone number.
31+
"""
32+
2833
provider: typing.Literal["byo-phone-number"] = "byo-phone-number"
2934
number_e_164_check_enabled: typing_extensions.Annotated[
3035
typing.Optional[bool], FieldMetadata(alias="numberE164CheckEnabled")

src/vapi/types/call_ended_reason.py

+2
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,8 @@
482482
"phone-call-provider-closed-websocket",
483483
"silence-timed-out",
484484
"call.in-progress.error-sip-telephony-provider-failed-to-connect-call",
485+
"call.ringing.hook-executed-say",
486+
"call.ringing.hook-executed-transfer",
485487
"twilio-failed-to-connect-call",
486488
"twilio-reported-customer-misdialed",
487489
"vonage-rejected",

src/vapi/types/create_byo_phone_number_dto.py

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ class CreateByoPhoneNumberDto(UncheckedBaseModel):
2323
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2424
"""
2525

26+
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
"""
28+
This is the hooks that will be used for incoming calls to this phone number.
29+
"""
30+
2631
provider: typing.Literal["byo-phone-number"] = "byo-phone-number"
2732
number_e_164_check_enabled: typing_extensions.Annotated[
2833
typing.Optional[bool], FieldMetadata(alias="numberE164CheckEnabled")

src/vapi/types/create_telnyx_phone_number_dto.py

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ class CreateTelnyxPhoneNumberDto(UncheckedBaseModel):
2323
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2424
"""
2525

26+
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
"""
28+
This is the hooks that will be used for incoming calls to this phone number.
29+
"""
30+
2631
provider: typing.Literal["telnyx"] = "telnyx"
2732
number: str = pydantic.Field()
2833
"""

src/vapi/types/create_twilio_phone_number_dto.py

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ class CreateTwilioPhoneNumberDto(UncheckedBaseModel):
2323
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2424
"""
2525

26+
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
"""
28+
This is the hooks that will be used for incoming calls to this phone number.
29+
"""
30+
2631
provider: typing.Literal["twilio"] = "twilio"
2732
number: str = pydantic.Field()
2833
"""

src/vapi/types/create_vapi_phone_number_dto.py

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ class CreateVapiPhoneNumberDto(UncheckedBaseModel):
2424
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2525
"""
2626

27+
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
28+
"""
29+
This is the hooks that will be used for incoming calls to this phone number.
30+
"""
31+
2732
provider: typing.Literal["vapi"] = "vapi"
2833
number_desired_area_code: typing_extensions.Annotated[
2934
typing.Optional[str], FieldMetadata(alias="numberDesiredAreaCode")

src/vapi/types/create_vonage_phone_number_dto.py

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ class CreateVonagePhoneNumberDto(UncheckedBaseModel):
2323
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2424
"""
2525

26+
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
"""
28+
This is the hooks that will be used for incoming calls to this phone number.
29+
"""
30+
2631
provider: typing.Literal["vonage"] = "vonage"
2732
number: str = pydantic.Field()
2833
"""

src/vapi/types/deepgram_voice.py

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import typing_extensions
77
from .deepgram_voice_id import DeepgramVoiceId
88
from ..core.serialization import FieldMetadata
9+
from .deepgram_voice_model import DeepgramVoiceModel
910
from .chunk_plan import ChunkPlan
1011
from .fallback_plan import FallbackPlan
1112
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -22,6 +23,11 @@ class DeepgramVoice(UncheckedBaseModel):
2223
This is the provider-specific ID that will be used.
2324
"""
2425

26+
model: typing.Optional[DeepgramVoiceModel] = pydantic.Field(default=None)
27+
"""
28+
This is the model that will be used. Defaults to 'aura-2' when not specified.
29+
"""
30+
2531
mip_opt_out: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="mipOptOut")] = pydantic.Field(
2632
default=None
2733
)

src/vapi/types/deepgram_voice_id.py

+50-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,54 @@
11
# This file was auto-generated by Fern from our API Definition.
22

33
import typing
4-
from .deepgram_voice_id_enum import DeepgramVoiceIdEnum
54

6-
DeepgramVoiceId = typing.Union[DeepgramVoiceIdEnum, str]
5+
DeepgramVoiceId = typing.Union[
6+
typing.Literal[
7+
"asteria",
8+
"luna",
9+
"stella",
10+
"athena",
11+
"hera",
12+
"orion",
13+
"arcas",
14+
"perseus",
15+
"angus",
16+
"orpheus",
17+
"helios",
18+
"zeus",
19+
"thalia",
20+
"andromeda",
21+
"helena",
22+
"apollo",
23+
"aries",
24+
"amalthea",
25+
"atlas",
26+
"aurora",
27+
"callista",
28+
"cora",
29+
"cordelia",
30+
"delia",
31+
"draco",
32+
"electra",
33+
"harmonia",
34+
"hermes",
35+
"hyperion",
36+
"iris",
37+
"janus",
38+
"juno",
39+
"jupiter",
40+
"mars",
41+
"minerva",
42+
"neptune",
43+
"odysseus",
44+
"ophelia",
45+
"pandora",
46+
"phoebe",
47+
"pluto",
48+
"saturn",
49+
"selene",
50+
"theia",
51+
"vesta",
52+
],
53+
typing.Any,
54+
]

src/vapi/types/deepgram_voice_id_enum.py

-10
This file was deleted.
+5
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+
DeepgramVoiceModel = typing.Union[typing.Literal["aura", "aura-2"], typing.Any]

src/vapi/types/exact_replacement.py

+13
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
from ..core.unchecked_base_model import UncheckedBaseModel
44
import typing
55
import pydantic
6+
import typing_extensions
7+
from ..core.serialization import FieldMetadata
68
from ..core.pydantic_utilities import IS_PYDANTIC_V2
79

810

@@ -19,6 +21,17 @@ class ExactReplacement(UncheckedBaseModel):
1921
- Replace a company name with its phonetic pronunciation: { type: 'exact', key: 'Vapi', value: 'Vappy' }
2022
"""
2123

24+
replace_all_enabled: typing_extensions.Annotated[
25+
typing.Optional[bool], FieldMetadata(alias="replaceAllEnabled")
26+
] = pydantic.Field(default=None)
27+
"""
28+
This option let's you control whether to replace all instances of the key or only the first one. By default, it only replaces the first instance.
29+
Examples:
30+
- For { type: 'exact', key: 'hello', value: 'hi', replaceAllEnabled: false }. Before: "hello world, hello universe" | After: "hi world, hello universe"
31+
- For { type: 'exact', key: 'hello', value: 'hi', replaceAllEnabled: true }. Before: "hello world, hello universe" | After: "hi world, hi universe"
32+
@default false
33+
"""
34+
2235
key: str = pydantic.Field()
2336
"""
2437
This is the key to replace.

src/vapi/types/fallback_deepgram_voice.py

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import typing_extensions
77
from .fallback_deepgram_voice_id import FallbackDeepgramVoiceId
88
from ..core.serialization import FieldMetadata
9+
from .fallback_deepgram_voice_model import FallbackDeepgramVoiceModel
910
from .chunk_plan import ChunkPlan
1011
from ..core.pydantic_utilities import IS_PYDANTIC_V2
1112

@@ -21,6 +22,11 @@ class FallbackDeepgramVoice(UncheckedBaseModel):
2122
This is the provider-specific ID that will be used.
2223
"""
2324

25+
model: typing.Optional[FallbackDeepgramVoiceModel] = pydantic.Field(default=None)
26+
"""
27+
This is the model that will be used. Defaults to 'aura-2' when not specified.
28+
"""
29+
2430
mip_opt_out: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="mipOptOut")] = pydantic.Field(
2531
default=None
2632
)
+50-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,54 @@
11
# This file was auto-generated by Fern from our API Definition.
22

33
import typing
4-
from .fallback_deepgram_voice_id_enum import FallbackDeepgramVoiceIdEnum
54

6-
FallbackDeepgramVoiceId = typing.Union[FallbackDeepgramVoiceIdEnum, str]
5+
FallbackDeepgramVoiceId = typing.Union[
6+
typing.Literal[
7+
"asteria",
8+
"luna",
9+
"stella",
10+
"athena",
11+
"hera",
12+
"orion",
13+
"arcas",
14+
"perseus",
15+
"angus",
16+
"orpheus",
17+
"helios",
18+
"zeus",
19+
"thalia",
20+
"andromeda",
21+
"helena",
22+
"apollo",
23+
"aries",
24+
"amalthea",
25+
"atlas",
26+
"aurora",
27+
"callista",
28+
"cora",
29+
"cordelia",
30+
"delia",
31+
"draco",
32+
"electra",
33+
"harmonia",
34+
"hermes",
35+
"hyperion",
36+
"iris",
37+
"janus",
38+
"juno",
39+
"jupiter",
40+
"mars",
41+
"minerva",
42+
"neptune",
43+
"odysseus",
44+
"ophelia",
45+
"pandora",
46+
"phoebe",
47+
"pluto",
48+
"saturn",
49+
"selene",
50+
"theia",
51+
"vesta",
52+
],
53+
typing.Any,
54+
]

src/vapi/types/fallback_deepgram_voice_id_enum.py

-10
This file was deleted.
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+
FallbackDeepgramVoiceModel = typing.Union[typing.Literal["aura", "aura-2"], typing.Any]

src/vapi/types/import_twilio_phone_number_dto.py

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ class ImportTwilioPhoneNumberDto(UncheckedBaseModel):
2323
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2424
"""
2525

26+
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
"""
28+
This is the hooks that will be used for incoming calls to this phone number.
29+
"""
30+
2631
twilio_phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="twilioPhoneNumber")] = pydantic.Field()
2732
"""
2833
These are the digits of the phone number you own on your Twilio.

src/vapi/types/import_vonage_phone_number_dto.py

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ class ImportVonagePhoneNumberDto(UncheckedBaseModel):
2323
If this is not set and above conditions are met, the inbound call is hung up with an error message.
2424
"""
2525

26+
hooks: typing.Optional[typing.List[typing.Optional[typing.Any]]] = pydantic.Field(default=None)
27+
"""
28+
This is the hooks that will be used for incoming calls to this phone number.
29+
"""
30+
2631
vonage_phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="vonagePhoneNumber")] = pydantic.Field()
2732
"""
2833
These are the digits of the phone number you own on your Vonage.

src/vapi/types/server_message_end_of_call_report_ended_reason.py

+2
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,8 @@
482482
"phone-call-provider-closed-websocket",
483483
"silence-timed-out",
484484
"call.in-progress.error-sip-telephony-provider-failed-to-connect-call",
485+
"call.ringing.hook-executed-say",
486+
"call.ringing.hook-executed-transfer",
485487
"twilio-failed-to-connect-call",
486488
"twilio-reported-customer-misdialed",
487489
"vonage-rejected",

src/vapi/types/server_message_status_update_ended_reason.py

+2
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,8 @@
482482
"phone-call-provider-closed-websocket",
483483
"silence-timed-out",
484484
"call.in-progress.error-sip-telephony-provider-failed-to-connect-call",
485+
"call.ringing.hook-executed-say",
486+
"call.ringing.hook-executed-transfer",
485487
"twilio-failed-to-connect-call",
486488
"twilio-reported-customer-misdialed",
487489
"vonage-rejected",

0 commit comments

Comments
 (0)