diff --git a/CHANGES.md b/CHANGES.md index 7ef0182818..27820f848b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,28 @@ twilio-python Changelog Here you can see the full list of changes between each twilio-python release. +[2025-10-28] Version 9.8.5 +-------------------------- +**Ai** +- Add `error` as possible transcript status +- Add `error` as possible transcript status + +**Chat** +- Updated v2 UserChannel `channel_status` from `not_participating` to `notParticipating` + +**Intelligence** +- Make intelligence work with RestProxy +- Add additional enums to better represent the possible states +- Add `error` enum to transcription status to better align with possible outputs +- Add `json` output type to text classification + +**Trusthub** +- Remove required parameter Primary Profile Sid from compliance_inquiry and compliance_inquiry_individual + +**Accounts** +- Add Messaging GeoPermissions API changes + + [2025-10-14] Version 9.8.4 -------------------------- **Library - Chore** diff --git a/setup.py b/setup.py index 16c46dbe97..34f55816e6 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup( name="twilio", - version="9.8.4", + version="9.8.5", description="Twilio API client and TwiML generator", author="Twilio", help_center="https://www.twilio.com/help/contact", diff --git a/twilio/__init__.py b/twilio/__init__.py index a2face03d9..87b2078624 100644 --- a/twilio/__init__.py +++ b/twilio/__init__.py @@ -1,2 +1,2 @@ -__version_info__ = ("9", "8", "4") +__version_info__ = ("9", "8", "5") __version__ = ".".join(__version_info__) diff --git a/twilio/rest/chat/v2/service/user/user_channel.py b/twilio/rest/chat/v2/service/user/user_channel.py index 9fab357368..b3db78dab7 100644 --- a/twilio/rest/chat/v2/service/user/user_channel.py +++ b/twilio/rest/chat/v2/service/user/user_channel.py @@ -27,7 +27,7 @@ class UserChannelInstance(InstanceResource): class ChannelStatus(object): JOINED = "joined" INVITED = "invited" - NOT_PARTICIPATING = "not_participating" + NOTPARTICIPATING = "notParticipating" class NotificationLevel(object): DEFAULT = "default" diff --git a/twilio/rest/flex_api/v1/interaction/interaction_channel/__init__.py b/twilio/rest/flex_api/v1/interaction/interaction_channel/__init__.py index 2f0cd81b20..3eb3255404 100644 --- a/twilio/rest/flex_api/v1/interaction/interaction_channel/__init__.py +++ b/twilio/rest/flex_api/v1/interaction/interaction_channel/__init__.py @@ -39,6 +39,7 @@ class ChannelStatus(object): CLOSED = "closed" INACTIVE = "inactive" PAUSE = "pause" + TRANSFER = "transfer" class Type(object): VOICE = "voice" diff --git a/twilio/rest/intelligence/v2/custom_operator.py b/twilio/rest/intelligence/v2/custom_operator.py index 3dd73d47bb..0563369836 100644 --- a/twilio/rest/intelligence/v2/custom_operator.py +++ b/twilio/rest/intelligence/v2/custom_operator.py @@ -29,6 +29,8 @@ class Availability(object): BETA = "beta" PUBLIC = "public" RETIRED = "retired" + GENERAL_AVAILABILITY = "general-availability" + DEPRECATED = "deprecated" """ :ivar account_sid: The unique SID identifier of the Account the Custom Operator belongs to. diff --git a/twilio/rest/intelligence/v2/operator.py b/twilio/rest/intelligence/v2/operator.py index 984c46d724..b4355a479d 100644 --- a/twilio/rest/intelligence/v2/operator.py +++ b/twilio/rest/intelligence/v2/operator.py @@ -28,6 +28,8 @@ class Availability(object): INTERNAL = "internal" BETA = "beta" PUBLIC = "public" + DEPRECATED = "deprecated" + GENERAL_AVAILABILITY = "general-availability" RETIRED = "retired" """ diff --git a/twilio/rest/intelligence/v2/operator_type.py b/twilio/rest/intelligence/v2/operator_type.py index b14e677ad2..3abcff8a2c 100644 --- a/twilio/rest/intelligence/v2/operator_type.py +++ b/twilio/rest/intelligence/v2/operator_type.py @@ -36,6 +36,7 @@ class OutputType(object): TEXT_EXTRACTION = "text-extraction" TEXT_EXTRACTION_NORMALIZED = "text-extraction-normalized" TEXT_GENERATION = "text-generation" + JSON = "json" class Provider(object): TWILIO = "twilio" diff --git a/twilio/rest/intelligence/v2/prebuilt_operator.py b/twilio/rest/intelligence/v2/prebuilt_operator.py index 50693f29c2..123a66bf37 100644 --- a/twilio/rest/intelligence/v2/prebuilt_operator.py +++ b/twilio/rest/intelligence/v2/prebuilt_operator.py @@ -29,6 +29,7 @@ class Availability(object): BETA = "beta" PUBLIC = "public" RETIRED = "retired" + GENERAL_AVAILABILITY = "general-availability" """ :ivar account_sid: The unique SID identifier of the Account the Pre-built Operator belongs to. diff --git a/twilio/rest/intelligence/v2/transcript/__init__.py b/twilio/rest/intelligence/v2/transcript/__init__.py index d0959b5104..6d41814c75 100644 --- a/twilio/rest/intelligence/v2/transcript/__init__.py +++ b/twilio/rest/intelligence/v2/transcript/__init__.py @@ -39,6 +39,7 @@ class Status(object): COMPLETED = "completed" FAILED = "failed" CANCELED = "canceled" + ERROR = "error" """ :ivar account_sid: The unique SID identifier of the Account. diff --git a/twilio/rest/intelligence/v2/transcript/operator_result.py b/twilio/rest/intelligence/v2/transcript/operator_result.py index 570262410e..6571e9c671 100644 --- a/twilio/rest/intelligence/v2/transcript/operator_result.py +++ b/twilio/rest/intelligence/v2/transcript/operator_result.py @@ -24,12 +24,12 @@ class OperatorResultInstance(InstanceResource): class OperatorType(object): - CONVERSATION_CLASSIFY = "conversation_classify" - UTTERANCE_CLASSIFY = "utterance_classify" + CONVERSATION_CLASSIFY = "conversation-classify" + UTTERANCE_CLASSIFY = "utterance-classify" EXTRACT = "extract" - EXTRACT_NORMALIZE = "extract_normalize" - PII_EXTRACT = "pii_extract" - TEXT_GENERATION = "text_generation" + EXTRACT_NORMALIZE = "extract-normalize" + PII_EXTRACT = "pii-extract" + TEXT_GENERATION = "text-generation" JSON = "json" """ diff --git a/twilio/rest/intelligence/v2/transcript/sentence.py b/twilio/rest/intelligence/v2/transcript/sentence.py index f4fb0b3b92..59d11dd400 100644 --- a/twilio/rest/intelligence/v2/transcript/sentence.py +++ b/twilio/rest/intelligence/v2/transcript/sentence.py @@ -42,15 +42,11 @@ def __init__(self, version: Version, payload: Dict[str, Any], transcript_sid: st self.sentence_index: Optional[int] = deserialize.integer( payload.get("sentence_index") ) - self.start_time: Optional[float] = deserialize.decimal( - payload.get("start_time") - ) - self.end_time: Optional[float] = deserialize.decimal(payload.get("end_time")) + self.start_time: Optional[str] = payload.get("start_time") + self.end_time: Optional[str] = payload.get("end_time") self.transcript: Optional[str] = payload.get("transcript") self.sid: Optional[str] = payload.get("sid") - self.confidence: Optional[float] = deserialize.decimal( - payload.get("confidence") - ) + self.confidence: Optional[str] = payload.get("confidence") self.words: Optional[List[Dict[str, object]]] = payload.get("words") self._solution = { diff --git a/twilio/rest/trusthub/v1/compliance_inquiries.py b/twilio/rest/trusthub/v1/compliance_inquiries.py index 3c1abd596a..d81df9f19b 100644 --- a/twilio/rest/trusthub/v1/compliance_inquiries.py +++ b/twilio/rest/trusthub/v1/compliance_inquiries.py @@ -211,25 +211,25 @@ def __init__(self, version: Version): def create( self, - primary_profile_sid: str, notification_email: Union[str, object] = values.unset, theme_set_id: Union[str, object] = values.unset, + primary_profile_sid: Union[str, object] = values.unset, ) -> ComplianceInquiriesInstance: """ Create the ComplianceInquiriesInstance - :param primary_profile_sid: The unique SID identifier of the Primary Customer Profile that should be used as a parent. Only necessary when creating a secondary Customer Profile. :param notification_email: The email address that approval status updates will be sent to. If not specified, the email address associated with your primary customer profile will be used. :param theme_set_id: Theme id for styling the inquiry form. + :param primary_profile_sid: The unique SID identifier of the Primary Customer Profile that should be used as a parent. Only necessary when creating a secondary Customer Profile. :returns: The created ComplianceInquiriesInstance """ data = values.of( { - "PrimaryProfileSid": primary_profile_sid, "NotificationEmail": notification_email, "ThemeSetId": theme_set_id, + "PrimaryProfileSid": primary_profile_sid, } ) headers = values.of({"Content-Type": "application/x-www-form-urlencoded"}) @@ -246,25 +246,25 @@ def create( async def create_async( self, - primary_profile_sid: str, notification_email: Union[str, object] = values.unset, theme_set_id: Union[str, object] = values.unset, + primary_profile_sid: Union[str, object] = values.unset, ) -> ComplianceInquiriesInstance: """ Asynchronously create the ComplianceInquiriesInstance - :param primary_profile_sid: The unique SID identifier of the Primary Customer Profile that should be used as a parent. Only necessary when creating a secondary Customer Profile. :param notification_email: The email address that approval status updates will be sent to. If not specified, the email address associated with your primary customer profile will be used. :param theme_set_id: Theme id for styling the inquiry form. + :param primary_profile_sid: The unique SID identifier of the Primary Customer Profile that should be used as a parent. Only necessary when creating a secondary Customer Profile. :returns: The created ComplianceInquiriesInstance """ data = values.of( { - "PrimaryProfileSid": primary_profile_sid, "NotificationEmail": notification_email, "ThemeSetId": theme_set_id, + "PrimaryProfileSid": primary_profile_sid, } ) headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})