Skip to content

Commit

Permalink
Merge branch 'main' into asabu_Python_changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AsabuHere authored Dec 12, 2024
2 parents 630c28c + fb53889 commit 26ee4d3
Show file tree
Hide file tree
Showing 37 changed files with 1,321 additions and 289 deletions.
51 changes: 51 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,57 @@ twilio-python Changelog

Here you can see the full list of changes between each twilio-python release.

[2024-12-05] Version 9.3.8
--------------------------
**Api**
- Add optional parameter `intelligence_service` to `transcription`
- Updated `phone_number_sid` to be populated for sip trunking terminating calls.

**Numbers**
- Add Update Hosted Number Order V2 API endpoint
- Update Port in docs

**Twiml**
- Add optional parameter `intelligence_service` to `<Transcription>`
- Add support for new `<ConversationRelay>` and `<Assistant>` noun
- Add `events` attribute to `<Dial>` verb


[2024-11-15] Version 9.3.7
--------------------------
**Library - Chore**
- [PR #819](https://github.com/twilio/twilio-python/pull/819): use older verison of aiohttp_retry. Thanks to [@sbansla](https://github.com/sbansla)!

**Api**
- Added `ivr-virtual-agent-custom-voices` and `ivr-virtual-agent-genai` to `usage_record` API.
- Add open-api file tag to realtime_transcriptions

**Taskrouter**
- Add `api-tag` property to workers reservation
- Add `api-tag` property to task reservation


[2024-10-25] Version 9.3.6
--------------------------
**Library - Chore**
- [PR #818](https://github.com/twilio/twilio-python/pull/818): removing unavailable references from init files. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!


[2024-10-24] Version 9.3.5
--------------------------
**Conversations**
- Expose ConversationWithParticipants resource that allows creating a conversation with participants


[2024-10-17] Version 9.3.4
--------------------------
**Api**
- Add response key `country` to fetch AvailablePhoneNumber resource by specific country.

**Messaging**
- Make library and doc public for requestManagedCert Endpoint


[2024-10-03] Version 9.3.3
--------------------------
**Library - Chore**
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pygments>=2.7.4 # not directly required, pinned by Snyk to avoid a vulnerability
requests>=2.31.0
PyJWT>=2.0.0, <3.0.0
aiohttp>=3.9.4
aiohttp-retry>=2.8.3
aiohttp-retry==2.8.3
certifi>=2023.7.22 # not directly required, pinned by Snyk to avoid a vulnerability
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setup(
name="twilio",
version="9.3.3",
version="9.3.8",
description="Twilio API client and TwiML generator",
author="Twilio",
help_center="https://www.twilio.com/help/contact",
Expand All @@ -24,7 +24,7 @@
"requests >= 2.0.0",
"PyJWT >= 2.0.0, < 3.0.0",
"aiohttp>=3.8.4",
"aiohttp-retry>=2.8.3",
"aiohttp-retry==2.8.3",
],
packages=find_packages(exclude=["tests", "tests.*"]),
include_package_data=True,
Expand Down
2 changes: 1 addition & 1 deletion twilio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version_info__ = ("9", "3", "3")
__version_info__ = ("9", "3", "8")
__version__ = ".".join(__version_info__)
6 changes: 6 additions & 0 deletions twilio/rest/api/v2010/account/call/transcription.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ def create(
speech_model: Union[str, object] = values.unset,
hints: Union[str, object] = values.unset,
enable_automatic_punctuation: Union[bool, object] = values.unset,
intelligence_service: Union[str, object] = values.unset,
) -> TranscriptionInstance:
"""
Create the TranscriptionInstance
Expand All @@ -278,6 +279,7 @@ def create(
:param speech_model: Recognition model used by the transcription engine, among those supported by the provider
:param hints: A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them.
:param enable_automatic_punctuation: The provider will add punctuation to recognition result
:param intelligence_service: The SID or the unique name of the [IntelligentService](https://www.twilio.com/docs/voice/intelligence/api/service-resource) to process the transcription.
:returns: The created TranscriptionInstance
"""
Expand All @@ -299,6 +301,7 @@ def create(
"EnableAutomaticPunctuation": serialize.boolean_to_string(
enable_automatic_punctuation
),
"IntelligenceService": intelligence_service,
}
)
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
Expand Down Expand Up @@ -329,6 +332,7 @@ async def create_async(
speech_model: Union[str, object] = values.unset,
hints: Union[str, object] = values.unset,
enable_automatic_punctuation: Union[bool, object] = values.unset,
intelligence_service: Union[str, object] = values.unset,
) -> TranscriptionInstance:
"""
Asynchronously create the TranscriptionInstance
Expand All @@ -346,6 +350,7 @@ async def create_async(
:param speech_model: Recognition model used by the transcription engine, among those supported by the provider
:param hints: A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them.
:param enable_automatic_punctuation: The provider will add punctuation to recognition result
:param intelligence_service: The SID or the unique name of the [IntelligentService](https://www.twilio.com/docs/voice/intelligence/api/service-resource) to process the transcription.
:returns: The created TranscriptionInstance
"""
Expand All @@ -367,6 +372,7 @@ async def create_async(
"EnableAutomaticPunctuation": serialize.boolean_to_string(
enable_automatic_punctuation
),
"IntelligenceService": intelligence_service,
}
)
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
Expand Down
2 changes: 2 additions & 0 deletions twilio/rest/api/v2010/account/usage/record/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class Category(object):
GROUP_ROOMS_PARTICIPANT_MINUTES = "group-rooms-participant-minutes"
GROUP_ROOMS_RECORDED_MINUTES = "group-rooms-recorded-minutes"
IMP_V1_USAGE = "imp-v1-usage"
IVR_VIRTUAL_AGENT_CUSTOM_VOICES = "ivr-virtual-agent-custom-voices"
IVR_VIRTUAL_AGENT_GENAI = "ivr-virtual-agent-genai"
LOOKUPS = "lookups"
MARKETPLACE = "marketplace"
MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION = (
Expand Down
2 changes: 2 additions & 0 deletions twilio/rest/api/v2010/account/usage/record/all_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class Category(object):
GROUP_ROOMS_PARTICIPANT_MINUTES = "group-rooms-participant-minutes"
GROUP_ROOMS_RECORDED_MINUTES = "group-rooms-recorded-minutes"
IMP_V1_USAGE = "imp-v1-usage"
IVR_VIRTUAL_AGENT_CUSTOM_VOICES = "ivr-virtual-agent-custom-voices"
IVR_VIRTUAL_AGENT_GENAI = "ivr-virtual-agent-genai"
LOOKUPS = "lookups"
MARKETPLACE = "marketplace"
MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION = (
Expand Down
2 changes: 2 additions & 0 deletions twilio/rest/api/v2010/account/usage/record/daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class Category(object):
GROUP_ROOMS_PARTICIPANT_MINUTES = "group-rooms-participant-minutes"
GROUP_ROOMS_RECORDED_MINUTES = "group-rooms-recorded-minutes"
IMP_V1_USAGE = "imp-v1-usage"
IVR_VIRTUAL_AGENT_CUSTOM_VOICES = "ivr-virtual-agent-custom-voices"
IVR_VIRTUAL_AGENT_GENAI = "ivr-virtual-agent-genai"
LOOKUPS = "lookups"
MARKETPLACE = "marketplace"
MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION = (
Expand Down
2 changes: 2 additions & 0 deletions twilio/rest/api/v2010/account/usage/record/last_month.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class Category(object):
GROUP_ROOMS_PARTICIPANT_MINUTES = "group-rooms-participant-minutes"
GROUP_ROOMS_RECORDED_MINUTES = "group-rooms-recorded-minutes"
IMP_V1_USAGE = "imp-v1-usage"
IVR_VIRTUAL_AGENT_CUSTOM_VOICES = "ivr-virtual-agent-custom-voices"
IVR_VIRTUAL_AGENT_GENAI = "ivr-virtual-agent-genai"
LOOKUPS = "lookups"
MARKETPLACE = "marketplace"
MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION = (
Expand Down
2 changes: 2 additions & 0 deletions twilio/rest/api/v2010/account/usage/record/monthly.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class Category(object):
GROUP_ROOMS_PARTICIPANT_MINUTES = "group-rooms-participant-minutes"
GROUP_ROOMS_RECORDED_MINUTES = "group-rooms-recorded-minutes"
IMP_V1_USAGE = "imp-v1-usage"
IVR_VIRTUAL_AGENT_CUSTOM_VOICES = "ivr-virtual-agent-custom-voices"
IVR_VIRTUAL_AGENT_GENAI = "ivr-virtual-agent-genai"
LOOKUPS = "lookups"
MARKETPLACE = "marketplace"
MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION = (
Expand Down
2 changes: 2 additions & 0 deletions twilio/rest/api/v2010/account/usage/record/this_month.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class Category(object):
GROUP_ROOMS_PARTICIPANT_MINUTES = "group-rooms-participant-minutes"
GROUP_ROOMS_RECORDED_MINUTES = "group-rooms-recorded-minutes"
IMP_V1_USAGE = "imp-v1-usage"
IVR_VIRTUAL_AGENT_CUSTOM_VOICES = "ivr-virtual-agent-custom-voices"
IVR_VIRTUAL_AGENT_GENAI = "ivr-virtual-agent-genai"
LOOKUPS = "lookups"
MARKETPLACE = "marketplace"
MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION = (
Expand Down
2 changes: 2 additions & 0 deletions twilio/rest/api/v2010/account/usage/record/today.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class Category(object):
GROUP_ROOMS_PARTICIPANT_MINUTES = "group-rooms-participant-minutes"
GROUP_ROOMS_RECORDED_MINUTES = "group-rooms-recorded-minutes"
IMP_V1_USAGE = "imp-v1-usage"
IVR_VIRTUAL_AGENT_CUSTOM_VOICES = "ivr-virtual-agent-custom-voices"
IVR_VIRTUAL_AGENT_GENAI = "ivr-virtual-agent-genai"
LOOKUPS = "lookups"
MARKETPLACE = "marketplace"
MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION = (
Expand Down
2 changes: 2 additions & 0 deletions twilio/rest/api/v2010/account/usage/record/yearly.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class Category(object):
GROUP_ROOMS_PARTICIPANT_MINUTES = "group-rooms-participant-minutes"
GROUP_ROOMS_RECORDED_MINUTES = "group-rooms-recorded-minutes"
IMP_V1_USAGE = "imp-v1-usage"
IVR_VIRTUAL_AGENT_CUSTOM_VOICES = "ivr-virtual-agent-custom-voices"
IVR_VIRTUAL_AGENT_GENAI = "ivr-virtual-agent-genai"
LOOKUPS = "lookups"
MARKETPLACE = "marketplace"
MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION = (
Expand Down
2 changes: 2 additions & 0 deletions twilio/rest/api/v2010/account/usage/record/yesterday.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class Category(object):
GROUP_ROOMS_PARTICIPANT_MINUTES = "group-rooms-participant-minutes"
GROUP_ROOMS_RECORDED_MINUTES = "group-rooms-recorded-minutes"
IMP_V1_USAGE = "imp-v1-usage"
IVR_VIRTUAL_AGENT_CUSTOM_VOICES = "ivr-virtual-agent-custom-voices"
IVR_VIRTUAL_AGENT_GENAI = "ivr-virtual-agent-genai"
LOOKUPS = "lookups"
MARKETPLACE = "marketplace"
MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION = (
Expand Down
2 changes: 2 additions & 0 deletions twilio/rest/api/v2010/account/usage/trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ class UsageCategory(object):
GROUP_ROOMS_PARTICIPANT_MINUTES = "group-rooms-participant-minutes"
GROUP_ROOMS_RECORDED_MINUTES = "group-rooms-recorded-minutes"
IMP_V1_USAGE = "imp-v1-usage"
IVR_VIRTUAL_AGENT_CUSTOM_VOICES = "ivr-virtual-agent-custom-voices"
IVR_VIRTUAL_AGENT_GENAI = "ivr-virtual-agent-genai"
LOOKUPS = "lookups"
MARKETPLACE = "marketplace"
MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION = (
Expand Down
25 changes: 0 additions & 25 deletions twilio/rest/autopilot/__init__.py

This file was deleted.

1 change: 1 addition & 0 deletions twilio/rest/content/v1/content/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class CallToActionActionType(object):
PHONE_NUMBER = "PHONE_NUMBER"
COPY_CODE = "COPY_CODE"
VOICE_CALL = "VOICE_CALL"
VOICE_CALL_REQUEST = "VOICE_CALL_REQUEST"

class CardActionType(object):
URL = "URL"
Expand Down
14 changes: 14 additions & 0 deletions twilio/rest/conversations/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
from twilio.rest.conversations.v1.address_configuration import AddressConfigurationList
from twilio.rest.conversations.v1.configuration import ConfigurationList
from twilio.rest.conversations.v1.conversation import ConversationList
from twilio.rest.conversations.v1.conversation_with_participants import (
ConversationWithParticipantsList,
)
from twilio.rest.conversations.v1.credential import CredentialList
from twilio.rest.conversations.v1.participant_conversation import (
ParticipantConversationList,
Expand All @@ -39,6 +42,9 @@ def __init__(self, domain: Domain):
self._address_configurations: Optional[AddressConfigurationList] = None
self._configuration: Optional[ConfigurationList] = None
self._conversations: Optional[ConversationList] = None
self._conversation_with_participants: Optional[
ConversationWithParticipantsList
] = None
self._credentials: Optional[CredentialList] = None
self._participant_conversations: Optional[ParticipantConversationList] = None
self._roles: Optional[RoleList] = None
Expand All @@ -63,6 +69,14 @@ def conversations(self) -> ConversationList:
self._conversations = ConversationList(self)
return self._conversations

@property
def conversation_with_participants(self) -> ConversationWithParticipantsList:
if self._conversation_with_participants is None:
self._conversation_with_participants = ConversationWithParticipantsList(
self
)
return self._conversation_with_participants

@property
def credentials(self) -> CredentialList:
if self._credentials is None:
Expand Down
Loading

0 comments on commit 26ee4d3

Please sign in to comment.