File tree 22 files changed +79
-20
lines changed
22 files changed +79
-20
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name = "vapi_server_sdk"
3
3
4
4
[tool .poetry ]
5
5
name = " vapi_server_sdk"
6
- version = " 1.3.0 "
6
+ version = " 1.4.1 "
7
7
description = " "
8
8
readme = " README.md"
9
9
authors = []
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ def __init__(
20
20
21
21
def get_headers (self ) -> typing .Dict [str , str ]:
22
22
headers : typing .Dict [str , str ] = {
23
- "User-Agent" : "vapi_server_sdk/1.3.0 " ,
23
+ "User-Agent" : "vapi_server_sdk/1.4.1 " ,
24
24
"X-Fern-Language" : "Python" ,
25
25
"X-Fern-SDK-Name" : "vapi_server_sdk" ,
26
- "X-Fern-SDK-Version" : "1.3.0 " ,
26
+ "X-Fern-SDK-Version" : "1.4.1 " ,
27
27
}
28
28
headers ["Authorization" ] = f"Bearer { self ._get_token ()} "
29
29
return headers
Original file line number Diff line number Diff line change 6
6
from .byo_phone_number_fallback_destination import ByoPhoneNumberFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
import datetime as dt
10
11
from .byo_phone_number_status import ByoPhoneNumberStatus
11
12
from .server import Server
@@ -25,7 +26,7 @@ class ByoPhoneNumber(UncheckedBaseModel):
25
26
If this is not set and above conditions are met, the inbound call is hung up with an error message.
26
27
"""
27
28
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 )
29
30
"""
30
31
This is the hooks that will be used for incoming calls to this phone number.
31
32
"""
Original file line number Diff line number Diff line change 6
6
from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
from .server import Server
10
11
from ..core .pydantic_utilities import IS_PYDANTIC_V2
11
12
@@ -23,7 +24,7 @@ class CreateByoPhoneNumberDto(UncheckedBaseModel):
23
24
If this is not set and above conditions are met, the inbound call is hung up with an error message.
24
25
"""
25
26
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 )
27
28
"""
28
29
This is the hooks that will be used for incoming calls to this phone number.
29
30
"""
Original file line number Diff line number Diff line change 6
6
from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
from .server import Server
10
11
from ..core .pydantic_utilities import IS_PYDANTIC_V2
11
12
@@ -23,7 +24,7 @@ class CreateTelnyxPhoneNumberDto(UncheckedBaseModel):
23
24
If this is not set and above conditions are met, the inbound call is hung up with an error message.
24
25
"""
25
26
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 )
27
28
"""
28
29
This is the hooks that will be used for incoming calls to this phone number.
29
30
"""
Original file line number Diff line number Diff line change 6
6
from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
from .server import Server
10
11
from ..core .pydantic_utilities import IS_PYDANTIC_V2
11
12
@@ -23,7 +24,7 @@ class CreateTwilioPhoneNumberDto(UncheckedBaseModel):
23
24
If this is not set and above conditions are met, the inbound call is hung up with an error message.
24
25
"""
25
26
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 )
27
28
"""
28
29
This is the hooks that will be used for incoming calls to this phone number.
29
30
"""
Original file line number Diff line number Diff line change 6
6
from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
from .sip_authentication import SipAuthentication
10
11
from .server import Server
11
12
from ..core .pydantic_utilities import IS_PYDANTIC_V2
@@ -24,7 +25,7 @@ class CreateVapiPhoneNumberDto(UncheckedBaseModel):
24
25
If this is not set and above conditions are met, the inbound call is hung up with an error message.
25
26
"""
26
27
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 )
28
29
"""
29
30
This is the hooks that will be used for incoming calls to this phone number.
30
31
"""
Original file line number Diff line number Diff line change 6
6
from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
from .server import Server
10
11
from ..core .pydantic_utilities import IS_PYDANTIC_V2
11
12
@@ -23,7 +24,7 @@ class CreateVonagePhoneNumberDto(UncheckedBaseModel):
23
24
If this is not set and above conditions are met, the inbound call is hung up with an error message.
24
25
"""
25
26
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 )
27
28
"""
28
29
This is the hooks that will be used for incoming calls to this phone number.
29
30
"""
Original file line number Diff line number Diff line change 6
6
from .import_twilio_phone_number_dto_fallback_destination import ImportTwilioPhoneNumberDtoFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
from .server import Server
10
11
from ..core .pydantic_utilities import IS_PYDANTIC_V2
11
12
@@ -23,7 +24,7 @@ class ImportTwilioPhoneNumberDto(UncheckedBaseModel):
23
24
If this is not set and above conditions are met, the inbound call is hung up with an error message.
24
25
"""
25
26
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 )
27
28
"""
28
29
This is the hooks that will be used for incoming calls to this phone number.
29
30
"""
Original file line number Diff line number Diff line change 6
6
from .import_vonage_phone_number_dto_fallback_destination import ImportVonagePhoneNumberDtoFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
from .server import Server
10
11
from ..core .pydantic_utilities import IS_PYDANTIC_V2
11
12
@@ -23,7 +24,7 @@ class ImportVonagePhoneNumberDto(UncheckedBaseModel):
23
24
If this is not set and above conditions are met, the inbound call is hung up with an error message.
24
25
"""
25
26
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 )
27
28
"""
28
29
This is the hooks that will be used for incoming calls to this phone number.
29
30
"""
Original file line number Diff line number Diff line change @@ -31,6 +31,15 @@ class MessagePlan(UncheckedBaseModel):
31
31
@default 3
32
32
"""
33
33
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
+
34
43
idle_timeout_seconds : typing_extensions .Annotated [
35
44
typing .Optional [float ], FieldMetadata (alias = "idleTimeoutSeconds" )
36
45
] = pydantic .Field (default = None )
Original file line number Diff line number Diff line change
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 number Diff line number Diff line change
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 ]]
Original file line number Diff line number Diff line change 6
6
from .telnyx_phone_number_fallback_destination import TelnyxPhoneNumberFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
import datetime as dt
10
11
from .telnyx_phone_number_status import TelnyxPhoneNumberStatus
11
12
from .server import Server
@@ -25,7 +26,7 @@ class TelnyxPhoneNumber(UncheckedBaseModel):
25
26
If this is not set and above conditions are met, the inbound call is hung up with an error message.
26
27
"""
27
28
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 )
29
30
"""
30
31
This is the hooks that will be used for incoming calls to this phone number.
31
32
"""
Original file line number Diff line number Diff line change 6
6
from .twilio_phone_number_fallback_destination import TwilioPhoneNumberFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
import datetime as dt
10
11
from .twilio_phone_number_status import TwilioPhoneNumberStatus
11
12
from .server import Server
@@ -25,7 +26,7 @@ class TwilioPhoneNumber(UncheckedBaseModel):
25
26
If this is not set and above conditions are met, the inbound call is hung up with an error message.
26
27
"""
27
28
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 )
29
30
"""
30
31
This is the hooks that will be used for incoming calls to this phone number.
31
32
"""
Original file line number Diff line number Diff line change 6
6
from .update_byo_phone_number_dto_fallback_destination import UpdateByoPhoneNumberDtoFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
from .server import Server
10
11
from ..core .pydantic_utilities import IS_PYDANTIC_V2
11
12
@@ -23,7 +24,7 @@ class UpdateByoPhoneNumberDto(UncheckedBaseModel):
23
24
If this is not set and above conditions are met, the inbound call is hung up with an error message.
24
25
"""
25
26
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 )
27
28
"""
28
29
This is the hooks that will be used for incoming calls to this phone number.
29
30
"""
Original file line number Diff line number Diff line change 6
6
from .update_telnyx_phone_number_dto_fallback_destination import UpdateTelnyxPhoneNumberDtoFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
from .server import Server
10
11
from ..core .pydantic_utilities import IS_PYDANTIC_V2
11
12
@@ -23,7 +24,7 @@ class UpdateTelnyxPhoneNumberDto(UncheckedBaseModel):
23
24
If this is not set and above conditions are met, the inbound call is hung up with an error message.
24
25
"""
25
26
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 )
27
28
"""
28
29
This is the hooks that will be used for incoming calls to this phone number.
29
30
"""
Original file line number Diff line number Diff line change 6
6
from .update_twilio_phone_number_dto_fallback_destination import UpdateTwilioPhoneNumberDtoFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
from .server import Server
10
11
from ..core .pydantic_utilities import IS_PYDANTIC_V2
11
12
@@ -23,7 +24,7 @@ class UpdateTwilioPhoneNumberDto(UncheckedBaseModel):
23
24
If this is not set and above conditions are met, the inbound call is hung up with an error message.
24
25
"""
25
26
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 )
27
28
"""
28
29
This is the hooks that will be used for incoming calls to this phone number.
29
30
"""
Original file line number Diff line number Diff line change 6
6
from .update_vapi_phone_number_dto_fallback_destination import UpdateVapiPhoneNumberDtoFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
from .server import Server
10
11
from .sip_authentication import SipAuthentication
11
12
from ..core .pydantic_utilities import IS_PYDANTIC_V2
@@ -24,7 +25,7 @@ class UpdateVapiPhoneNumberDto(UncheckedBaseModel):
24
25
If this is not set and above conditions are met, the inbound call is hung up with an error message.
25
26
"""
26
27
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 )
28
29
"""
29
30
This is the hooks that will be used for incoming calls to this phone number.
30
31
"""
Original file line number Diff line number Diff line change 6
6
from .update_vonage_phone_number_dto_fallback_destination import UpdateVonagePhoneNumberDtoFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
from .server import Server
10
11
from ..core .pydantic_utilities import IS_PYDANTIC_V2
11
12
@@ -23,7 +24,7 @@ class UpdateVonagePhoneNumberDto(UncheckedBaseModel):
23
24
If this is not set and above conditions are met, the inbound call is hung up with an error message.
24
25
"""
25
26
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 )
27
28
"""
28
29
This is the hooks that will be used for incoming calls to this phone number.
29
30
"""
Original file line number Diff line number Diff line change 6
6
from .vapi_phone_number_fallback_destination import VapiPhoneNumberFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
import datetime as dt
10
11
from .vapi_phone_number_status import VapiPhoneNumberStatus
11
12
from .server import Server
@@ -26,7 +27,7 @@ class VapiPhoneNumber(UncheckedBaseModel):
26
27
If this is not set and above conditions are met, the inbound call is hung up with an error message.
27
28
"""
28
29
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 )
30
31
"""
31
32
This is the hooks that will be used for incoming calls to this phone number.
32
33
"""
Original file line number Diff line number Diff line change 6
6
from .vonage_phone_number_fallback_destination import VonagePhoneNumberFallbackDestination
7
7
from ..core .serialization import FieldMetadata
8
8
import pydantic
9
+ from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging
9
10
import datetime as dt
10
11
from .vonage_phone_number_status import VonagePhoneNumberStatus
11
12
from .server import Server
@@ -25,7 +26,7 @@ class VonagePhoneNumber(UncheckedBaseModel):
25
26
If this is not set and above conditions are met, the inbound call is hung up with an error message.
26
27
"""
27
28
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 )
29
30
"""
30
31
This is the hooks that will be used for incoming calls to this phone number.
31
32
"""
You can’t perform that action at this time.
0 commit comments