Skip to content

Commit 30674b2

Browse files
committed
[Librarian] Regenerated @ 66882adf0db70d1f2bc084fe6acef7d99445b17b
1 parent d9a0e5d commit 30674b2

File tree

12 files changed

+2681
-4
lines changed

12 files changed

+2681
-4
lines changed

CHANGES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@ twilio-python Changelog
33

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

6+
[2023-06-01] Version 8.2.2
7+
--------------------------
8+
**Api**
9+
- Add `Trim` to create Conference Participant API
10+
11+
**Intelligence**
12+
- First public beta release for Voice Intelligence APIs with client libraries
13+
14+
**Messaging**
15+
- Add new `errors` attribute to us_app_to_person resource. This attribute will provide additional information about campaign registration errors.
16+
17+
618
[2023-05-18] Version 8.2.1
719
--------------------------
820
**Conversations**

twilio/rest/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from twilio.rest.flex_api import FlexApi
2525
from twilio.rest.frontline_api import FrontlineApi
2626
from twilio.rest.insights import Insights
27+
from twilio.rest.intelligence import Intelligence
2728
from twilio.rest.ip_messaging import IpMessaging
2829
from twilio.rest.lookups import Lookups
2930
from twilio.rest.media import Media
@@ -132,6 +133,7 @@ def __init__(
132133
self._flex_api: Optional["FlexApi"] = None
133134
self._frontline_api: Optional["FrontlineApi"] = None
134135
self._insights: Optional["Insights"] = None
136+
self._intelligence: Optional["Intelligence"] = None
135137
self._ip_messaging: Optional["IpMessaging"] = None
136138
self._lookups: Optional["Lookups"] = None
137139
self._media: Optional["Media"] = None
@@ -300,6 +302,19 @@ def insights(self) -> "Insights":
300302
self._insights = Insights(self)
301303
return self._insights
302304

305+
@property
306+
def intelligence(self) -> "Intelligence":
307+
"""
308+
Access the Intelligence Twilio Domain
309+
310+
:returns: Intelligence Twilio Domain
311+
"""
312+
if self._intelligence is None:
313+
from twilio.rest.intelligence import Intelligence
314+
315+
self._intelligence = Intelligence(self)
316+
return self._intelligence
317+
303318
@property
304319
def ip_messaging(self) -> "IpMessaging":
305320
"""

twilio/rest/api/v2010/account/conference/participant.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ def create(
570570
machine_detection_silence_timeout: Union[int, object] = values.unset,
571571
amd_status_callback: Union[str, object] = values.unset,
572572
amd_status_callback_method: Union[str, object] = values.unset,
573+
trim: Union[str, object] = values.unset,
573574
) -> ParticipantInstance:
574575
"""
575576
Create the ParticipantInstance
@@ -591,7 +592,7 @@ def create(
591592
:param early_media: Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`.
592593
:param max_participants: The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
593594
:param conference_record: Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
594-
:param conference_trim: Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
595+
:param conference_trim: Whether to trim leading and trailing silence from the conference recording. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
595596
:param conference_status_callback: The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored.
596597
:param conference_status_callback_method: The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
597598
:param conference_status_callback_event: The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `modify`, `speaker`, and `announcement`. Separate multiple values with a space. Defaults to `start end`.
@@ -620,6 +621,7 @@ def create(
620621
:param machine_detection_silence_timeout: The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000.
621622
:param amd_status_callback: The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax.
622623
:param amd_status_callback_method: The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
624+
:param trim: Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
623625
624626
:returns: The created ParticipantInstance
625627
"""
@@ -679,6 +681,7 @@ def create(
679681
"MachineDetectionSilenceTimeout": machine_detection_silence_timeout,
680682
"AmdStatusCallback": amd_status_callback,
681683
"AmdStatusCallbackMethod": amd_status_callback_method,
684+
"Trim": trim,
682685
}
683686
)
684687

@@ -745,6 +748,7 @@ async def create_async(
745748
machine_detection_silence_timeout: Union[int, object] = values.unset,
746749
amd_status_callback: Union[str, object] = values.unset,
747750
amd_status_callback_method: Union[str, object] = values.unset,
751+
trim: Union[str, object] = values.unset,
748752
) -> ParticipantInstance:
749753
"""
750754
Asynchronously create the ParticipantInstance
@@ -766,7 +770,7 @@ async def create_async(
766770
:param early_media: Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`.
767771
:param max_participants: The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
768772
:param conference_record: Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
769-
:param conference_trim: Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
773+
:param conference_trim: Whether to trim leading and trailing silence from the conference recording. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
770774
:param conference_status_callback: The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored.
771775
:param conference_status_callback_method: The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
772776
:param conference_status_callback_event: The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `modify`, `speaker`, and `announcement`. Separate multiple values with a space. Defaults to `start end`.
@@ -795,6 +799,7 @@ async def create_async(
795799
:param machine_detection_silence_timeout: The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000.
796800
:param amd_status_callback: The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax.
797801
:param amd_status_callback_method: The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
802+
:param trim: Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
798803
799804
:returns: The created ParticipantInstance
800805
"""
@@ -854,6 +859,7 @@ async def create_async(
854859
"MachineDetectionSilenceTimeout": machine_detection_silence_timeout,
855860
"AmdStatusCallback": amd_status_callback,
856861
"AmdStatusCallbackMethod": amd_status_callback_method,
862+
"Trim": trim,
857863
}
858864
)
859865

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
r"""
2+
This code was generated by
3+
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
7+
NOTE: This class is auto generated by OpenAPI Generator.
8+
https://openapi-generator.tech
9+
Do not edit the class manually.
10+
"""
11+
12+
from typing import Optional
13+
14+
from twilio.base.domain import Domain
15+
from twilio.rest import Client
16+
from twilio.rest.intelligence.v2 import V2
17+
18+
19+
class IntelligenceBase(Domain):
20+
def __init__(self, twilio: Client):
21+
"""
22+
Initialize the Intelligence Domain
23+
24+
:returns: Domain for Intelligence
25+
"""
26+
super().__init__(twilio, "https://intelligence.twilio.com")
27+
self._v2: Optional[V2] = None
28+
29+
@property
30+
def v2(self) -> V2:
31+
"""
32+
:returns: Versions v2 of Intelligence
33+
"""
34+
if self._v2 is None:
35+
self._v2 = V2(self)
36+
return self._v2
37+
38+
def __repr__(self) -> str:
39+
"""
40+
Provide a friendly representation
41+
:returns: Machine friendly representation
42+
"""
43+
return "<Twilio.Intelligence>"
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
r"""
2+
This code was generated by
3+
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
7+
Twilio - Intelligence
8+
This is the public Twilio REST API.
9+
10+
NOTE: This class is auto generated by OpenAPI Generator.
11+
https://openapi-generator.tech
12+
Do not edit the class manually.
13+
"""
14+
15+
from typing import Optional
16+
from twilio.base.version import Version
17+
from twilio.base.domain import Domain
18+
from twilio.rest.intelligence.v2.service import ServiceList
19+
from twilio.rest.intelligence.v2.transcript import TranscriptList
20+
21+
22+
class V2(Version):
23+
def __init__(self, domain: Domain):
24+
"""
25+
Initialize the V2 version of Intelligence
26+
27+
:param domain: The Twilio.intelligence domain
28+
"""
29+
super().__init__(domain, "v2")
30+
self._services: Optional[ServiceList] = None
31+
self._transcripts: Optional[TranscriptList] = None
32+
33+
@property
34+
def services(self) -> ServiceList:
35+
if self._services is None:
36+
self._services = ServiceList(self)
37+
return self._services
38+
39+
@property
40+
def transcripts(self) -> TranscriptList:
41+
if self._transcripts is None:
42+
self._transcripts = TranscriptList(self)
43+
return self._transcripts
44+
45+
def __repr__(self) -> str:
46+
"""
47+
Provide a friendly representation
48+
:returns: Machine friendly representation
49+
"""
50+
return "<Twilio.Intelligence.V2>"

0 commit comments

Comments
 (0)