telnyx 3.2.0a0__py3-none-any.whl → 3.3.0a0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of telnyx might be problematic. Click here for more details.
- telnyx/_client.py +5 -0
- telnyx/_version.py +1 -1
- telnyx/resources/__init__.py +3 -0
- telnyx/resources/webhooks.py +34 -0
- telnyx/types/__init__.py +111 -0
- telnyx/types/call_ai_gather_ended_webhook_event.py +78 -0
- telnyx/types/call_ai_gather_message_history_updated_webhook_event.py +69 -0
- telnyx/types/call_ai_gather_partial_results_webhook_event.py +75 -0
- telnyx/types/call_answered_webhook_event.py +75 -0
- telnyx/types/call_bridged_webhook_event.py +58 -0
- telnyx/types/call_conversation_ended_webhook_event.py +84 -0
- telnyx/types/call_conversation_insights_generated_webhook_event.py +67 -0
- telnyx/types/call_dtmf_received_webhook_event.py +61 -0
- telnyx/types/call_enqueued_webhook_event.py +59 -0
- telnyx/types/call_fork_started_webhook_event.py +53 -0
- telnyx/types/call_fork_stopped_webhook_event.py +53 -0
- telnyx/types/call_gather_ended_webhook_event.py +64 -0
- telnyx/types/call_hangup_webhook_event.py +150 -0
- telnyx/types/call_initiated_webhook_event.py +96 -0
- telnyx/types/call_left_queue_webhook_event.py +62 -0
- telnyx/types/call_machine_detection_ended_webhook_event.py +61 -0
- telnyx/types/call_machine_greeting_ended_webhook_event.py +61 -0
- telnyx/types/call_machine_premium_detection_ended_webhook_event.py +63 -0
- telnyx/types/call_machine_premium_greeting_ended_webhook_event.py +61 -0
- telnyx/types/call_playback_ended_webhook_event.py +70 -0
- telnyx/types/call_playback_started_webhook_event.py +62 -0
- telnyx/types/call_recording_error_webhook_event.py +60 -0
- telnyx/types/call_recording_saved_webhook_event.py +94 -0
- telnyx/types/call_recording_transcription_saved_webhook_event.py +71 -0
- telnyx/types/call_refer_completed_webhook_event.py +61 -0
- telnyx/types/call_refer_failed_webhook_event.py +61 -0
- telnyx/types/call_refer_started_webhook_event.py +61 -0
- telnyx/types/call_siprec_failed_webhook_event.py +53 -0
- telnyx/types/call_siprec_started_webhook_event.py +50 -0
- telnyx/types/call_siprec_stopped_webhook_event.py +53 -0
- telnyx/types/call_speak_ended_webhook_event.py +53 -0
- telnyx/types/call_speak_started_webhook_event.py +50 -0
- telnyx/types/call_streaming_failed_webhook_event.py +70 -0
- telnyx/types/call_streaming_started_webhook_event.py +53 -0
- telnyx/types/call_streaming_stopped_webhook_event.py +53 -0
- telnyx/types/campaign_status_update_webhook_event.py +26 -0
- telnyx/types/conference_created_webhook_event.py +53 -0
- telnyx/types/conference_ended_webhook_event.py +56 -0
- telnyx/types/conference_floor_changed_webhook_event.py +45 -0
- telnyx/types/conference_participant_joined_webhook_event.py +53 -0
- telnyx/types/conference_participant_left_webhook_event.py +53 -0
- telnyx/types/conference_participant_playback_ended_webhook_event.py +65 -0
- telnyx/types/conference_participant_playback_started_webhook_event.py +65 -0
- telnyx/types/conference_participant_speak_ended_webhook_event.py +56 -0
- telnyx/types/conference_participant_speak_started_webhook_event.py +56 -0
- telnyx/types/conference_playback_ended_webhook_event.py +49 -0
- telnyx/types/conference_playback_started_webhook_event.py +49 -0
- telnyx/types/conference_recording_saved_webhook_event.py +103 -0
- telnyx/types/conference_speak_ended_webhook_event.py +40 -0
- telnyx/types/conference_speak_started_webhook_event.py +40 -0
- telnyx/types/custom_sip_header.py +13 -0
- telnyx/types/customer_service_record_status_changed_webhook_event.py +55 -0
- telnyx/types/delivery_update_webhook_event.py +40 -0
- telnyx/types/fax_delivered_webhook_event.py +69 -0
- telnyx/types/fax_failed_webhook_event.py +66 -0
- telnyx/types/fax_media_processed_webhook_event.py +63 -0
- telnyx/types/fax_queued_webhook_event.py +63 -0
- telnyx/types/fax_sending_started_webhook_event.py +63 -0
- telnyx/types/inbound_message_webhook_event.py +227 -0
- telnyx/types/number_order_status_update_webhook_event.py +12 -0
- telnyx/types/replaced_link_click_webhook_event.py +32 -0
- telnyx/types/sip_header.py +15 -0
- telnyx/types/streaming_failed_webhook_event.py +70 -0
- telnyx/types/streaming_started_webhook_event.py +53 -0
- telnyx/types/streaming_stopped_webhook_event.py +53 -0
- telnyx/types/transcription_webhook_event.py +72 -0
- telnyx/types/unwrap_webhook_event.py +138 -0
- {telnyx-3.2.0a0.dist-info → telnyx-3.3.0a0.dist-info}/METADATA +1 -1
- {telnyx-3.2.0a0.dist-info → telnyx-3.3.0a0.dist-info}/RECORD +76 -8
- {telnyx-3.2.0a0.dist-info → telnyx-3.3.0a0.dist-info}/WHEEL +0 -0
- {telnyx-3.2.0a0.dist-info → telnyx-3.3.0a0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["FaxQueuedWebhookEvent", "Payload"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Payload(BaseModel):
|
|
14
|
+
client_state: Optional[str] = None
|
|
15
|
+
"""State received from a command."""
|
|
16
|
+
|
|
17
|
+
connection_id: Optional[str] = None
|
|
18
|
+
"""The ID of the connection used to send the fax."""
|
|
19
|
+
|
|
20
|
+
direction: Optional[Literal["inbound", "outbound"]] = None
|
|
21
|
+
"""The direction of the fax."""
|
|
22
|
+
|
|
23
|
+
fax_id: Optional[str] = None
|
|
24
|
+
"""Identifies the fax."""
|
|
25
|
+
|
|
26
|
+
from_: Optional[str] = FieldInfo(alias="from", default=None)
|
|
27
|
+
"""The phone number, in E.164 format, the fax will be sent from."""
|
|
28
|
+
|
|
29
|
+
media_name: Optional[str] = None
|
|
30
|
+
"""The media_name used for the fax's media.
|
|
31
|
+
|
|
32
|
+
Must point to a file previously uploaded to api.telnyx.com/v2/media by the same
|
|
33
|
+
user/organization. media_name and media_url/contents can't be submitted
|
|
34
|
+
together.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
original_media_url: Optional[str] = None
|
|
38
|
+
"""The original URL to the PDF used for the fax's media.
|
|
39
|
+
|
|
40
|
+
If media_name was supplied, this is omitted
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
status: Optional[Literal["queued"]] = None
|
|
44
|
+
"""The status of the fax."""
|
|
45
|
+
|
|
46
|
+
to: Optional[str] = None
|
|
47
|
+
"""The phone number, in E.164 format, the fax will be sent to or SIP URI"""
|
|
48
|
+
|
|
49
|
+
user_id: Optional[str] = None
|
|
50
|
+
"""Identifier of the user to whom the fax belongs"""
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class FaxQueuedWebhookEvent(BaseModel):
|
|
54
|
+
id: Optional[str] = None
|
|
55
|
+
"""Identifies the type of resource."""
|
|
56
|
+
|
|
57
|
+
event_type: Optional[Literal["fax.queued"]] = None
|
|
58
|
+
"""The type of event being delivered."""
|
|
59
|
+
|
|
60
|
+
payload: Optional[Payload] = None
|
|
61
|
+
|
|
62
|
+
record_type: Optional[Literal["event"]] = None
|
|
63
|
+
"""Identifies the type of the resource."""
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["FaxSendingStartedWebhookEvent", "Payload"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Payload(BaseModel):
|
|
14
|
+
client_state: Optional[str] = None
|
|
15
|
+
"""State received from a command."""
|
|
16
|
+
|
|
17
|
+
connection_id: Optional[str] = None
|
|
18
|
+
"""The ID of the connection used to send the fax."""
|
|
19
|
+
|
|
20
|
+
direction: Optional[Literal["inbound", "outbound"]] = None
|
|
21
|
+
"""The direction of the fax."""
|
|
22
|
+
|
|
23
|
+
fax_id: Optional[str] = None
|
|
24
|
+
"""Identifies the fax."""
|
|
25
|
+
|
|
26
|
+
from_: Optional[str] = FieldInfo(alias="from", default=None)
|
|
27
|
+
"""The phone number, in E.164 format, the fax will be sent from."""
|
|
28
|
+
|
|
29
|
+
media_name: Optional[str] = None
|
|
30
|
+
"""The media_name used for the fax's media.
|
|
31
|
+
|
|
32
|
+
Must point to a file previously uploaded to api.telnyx.com/v2/media by the same
|
|
33
|
+
user/organization. media_name and media_url/contents can't be submitted
|
|
34
|
+
together.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
original_media_url: Optional[str] = None
|
|
38
|
+
"""The original URL to the PDF used for the fax's media.
|
|
39
|
+
|
|
40
|
+
If media_name was supplied, this is omitted
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
status: Optional[Literal["sending"]] = None
|
|
44
|
+
"""The status of the fax."""
|
|
45
|
+
|
|
46
|
+
to: Optional[str] = None
|
|
47
|
+
"""The phone number, in E.164 format, the fax will be sent to or SIP URI"""
|
|
48
|
+
|
|
49
|
+
user_id: Optional[str] = None
|
|
50
|
+
"""Identifier of the user to whom the fax belongs"""
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class FaxSendingStartedWebhookEvent(BaseModel):
|
|
54
|
+
id: Optional[str] = None
|
|
55
|
+
"""Identifies the type of resource."""
|
|
56
|
+
|
|
57
|
+
event_type: Optional[Literal["fax.sending.started"]] = None
|
|
58
|
+
"""The type of event being delivered."""
|
|
59
|
+
|
|
60
|
+
payload: Optional[Payload] = None
|
|
61
|
+
|
|
62
|
+
record_type: Optional[Literal["event"]] = None
|
|
63
|
+
"""Identifies the type of the resource."""
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from pydantic import Field as FieldInfo
|
|
8
|
+
|
|
9
|
+
from .._models import BaseModel
|
|
10
|
+
from .messaging_error import MessagingError
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"InboundMessageWebhookEvent",
|
|
14
|
+
"Data",
|
|
15
|
+
"DataPayload",
|
|
16
|
+
"DataPayloadCc",
|
|
17
|
+
"DataPayloadCost",
|
|
18
|
+
"DataPayloadCostBreakdown",
|
|
19
|
+
"DataPayloadCostBreakdownCarrierFee",
|
|
20
|
+
"DataPayloadCostBreakdownRate",
|
|
21
|
+
"DataPayloadFrom",
|
|
22
|
+
"DataPayloadMedia",
|
|
23
|
+
"DataPayloadTo",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class DataPayloadCc(BaseModel):
|
|
28
|
+
carrier: Optional[str] = None
|
|
29
|
+
"""The carrier of the receiver."""
|
|
30
|
+
|
|
31
|
+
line_type: Optional[Literal["Wireline", "Wireless", "VoWiFi", "VoIP", "Pre-Paid Wireless", ""]] = None
|
|
32
|
+
"""The line-type of the receiver."""
|
|
33
|
+
|
|
34
|
+
phone_number: Optional[str] = None
|
|
35
|
+
"""Receiving address (+E.164 formatted phone number or short code)."""
|
|
36
|
+
|
|
37
|
+
status: Optional[
|
|
38
|
+
Literal["queued", "sending", "sent", "delivered", "sending_failed", "delivery_failed", "delivery_unconfirmed"]
|
|
39
|
+
] = None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class DataPayloadCost(BaseModel):
|
|
43
|
+
amount: Optional[str] = None
|
|
44
|
+
"""The amount deducted from your account."""
|
|
45
|
+
|
|
46
|
+
currency: Optional[str] = None
|
|
47
|
+
"""The ISO 4217 currency identifier."""
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class DataPayloadCostBreakdownCarrierFee(BaseModel):
|
|
51
|
+
amount: Optional[str] = None
|
|
52
|
+
"""The carrier fee amount."""
|
|
53
|
+
|
|
54
|
+
currency: Optional[str] = None
|
|
55
|
+
"""The ISO 4217 currency identifier."""
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class DataPayloadCostBreakdownRate(BaseModel):
|
|
59
|
+
amount: Optional[str] = None
|
|
60
|
+
"""The rate amount applied."""
|
|
61
|
+
|
|
62
|
+
currency: Optional[str] = None
|
|
63
|
+
"""The ISO 4217 currency identifier."""
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class DataPayloadCostBreakdown(BaseModel):
|
|
67
|
+
carrier_fee: Optional[DataPayloadCostBreakdownCarrierFee] = None
|
|
68
|
+
|
|
69
|
+
rate: Optional[DataPayloadCostBreakdownRate] = None
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class DataPayloadFrom(BaseModel):
|
|
73
|
+
carrier: Optional[str] = None
|
|
74
|
+
"""The carrier of the sender."""
|
|
75
|
+
|
|
76
|
+
line_type: Optional[Literal["Wireline", "Wireless", "VoWiFi", "VoIP", "Pre-Paid Wireless", ""]] = None
|
|
77
|
+
"""The line-type of the sender."""
|
|
78
|
+
|
|
79
|
+
phone_number: Optional[str] = None
|
|
80
|
+
"""
|
|
81
|
+
Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short
|
|
82
|
+
code).
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
status: Optional[Literal["received", "delivered"]] = None
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class DataPayloadMedia(BaseModel):
|
|
89
|
+
content_type: Optional[str] = None
|
|
90
|
+
"""The MIME type of the requested media."""
|
|
91
|
+
|
|
92
|
+
hash_sha256: Optional[str] = None
|
|
93
|
+
"""The SHA256 hash of the requested media."""
|
|
94
|
+
|
|
95
|
+
size: Optional[int] = None
|
|
96
|
+
"""The size of the requested media."""
|
|
97
|
+
|
|
98
|
+
url: Optional[str] = None
|
|
99
|
+
"""The url of the media requested to be sent."""
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class DataPayloadTo(BaseModel):
|
|
103
|
+
carrier: Optional[str] = None
|
|
104
|
+
"""The carrier of the receiver."""
|
|
105
|
+
|
|
106
|
+
line_type: Optional[Literal["Wireline", "Wireless", "VoWiFi", "VoIP", "Pre-Paid Wireless", ""]] = None
|
|
107
|
+
"""The line-type of the receiver."""
|
|
108
|
+
|
|
109
|
+
phone_number: Optional[str] = None
|
|
110
|
+
"""Receiving address (+E.164 formatted phone number or short code)."""
|
|
111
|
+
|
|
112
|
+
status: Optional[
|
|
113
|
+
Literal[
|
|
114
|
+
"queued",
|
|
115
|
+
"sending",
|
|
116
|
+
"sent",
|
|
117
|
+
"delivered",
|
|
118
|
+
"sending_failed",
|
|
119
|
+
"delivery_failed",
|
|
120
|
+
"delivery_unconfirmed",
|
|
121
|
+
"webhook_delivered",
|
|
122
|
+
]
|
|
123
|
+
] = None
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
class DataPayload(BaseModel):
|
|
127
|
+
id: Optional[str] = None
|
|
128
|
+
"""Identifies the type of resource."""
|
|
129
|
+
|
|
130
|
+
cc: Optional[List[DataPayloadCc]] = None
|
|
131
|
+
|
|
132
|
+
completed_at: Optional[datetime] = None
|
|
133
|
+
"""Not used for inbound messages."""
|
|
134
|
+
|
|
135
|
+
cost: Optional[DataPayloadCost] = None
|
|
136
|
+
|
|
137
|
+
cost_breakdown: Optional[DataPayloadCostBreakdown] = None
|
|
138
|
+
"""Detailed breakdown of the message cost components."""
|
|
139
|
+
|
|
140
|
+
direction: Optional[Literal["inbound"]] = None
|
|
141
|
+
"""The direction of the message.
|
|
142
|
+
|
|
143
|
+
Inbound messages are sent to you whereas outbound messages are sent from you.
|
|
144
|
+
"""
|
|
145
|
+
|
|
146
|
+
encoding: Optional[str] = None
|
|
147
|
+
"""Encoding scheme used for the message body."""
|
|
148
|
+
|
|
149
|
+
errors: Optional[List[MessagingError]] = None
|
|
150
|
+
"""
|
|
151
|
+
These errors may point at addressees when referring to unsuccessful/unconfirmed
|
|
152
|
+
delivery statuses.
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
from_: Optional[DataPayloadFrom] = FieldInfo(alias="from", default=None)
|
|
156
|
+
|
|
157
|
+
media: Optional[List[DataPayloadMedia]] = None
|
|
158
|
+
|
|
159
|
+
messaging_profile_id: Optional[str] = None
|
|
160
|
+
"""Unique identifier for a messaging profile."""
|
|
161
|
+
|
|
162
|
+
parts: Optional[int] = None
|
|
163
|
+
"""Number of parts into which the message's body must be split."""
|
|
164
|
+
|
|
165
|
+
received_at: Optional[datetime] = None
|
|
166
|
+
"""ISO 8601 formatted date indicating when the message request was received."""
|
|
167
|
+
|
|
168
|
+
record_type: Optional[Literal["message"]] = None
|
|
169
|
+
"""Identifies the type of the resource."""
|
|
170
|
+
|
|
171
|
+
sent_at: Optional[datetime] = None
|
|
172
|
+
"""Not used for inbound messages."""
|
|
173
|
+
|
|
174
|
+
tags: Optional[List[str]] = None
|
|
175
|
+
"""Tags associated with the resource."""
|
|
176
|
+
|
|
177
|
+
tcr_campaign_billable: Optional[bool] = None
|
|
178
|
+
"""Indicates whether the TCR campaign is billable."""
|
|
179
|
+
|
|
180
|
+
tcr_campaign_id: Optional[str] = None
|
|
181
|
+
"""The Campaign Registry (TCR) campaign ID associated with the message."""
|
|
182
|
+
|
|
183
|
+
tcr_campaign_registered: Optional[str] = None
|
|
184
|
+
"""The registration status of the TCR campaign."""
|
|
185
|
+
|
|
186
|
+
text: Optional[str] = None
|
|
187
|
+
"""Message body (i.e., content) as a non-empty string.
|
|
188
|
+
|
|
189
|
+
**Required for SMS**
|
|
190
|
+
"""
|
|
191
|
+
|
|
192
|
+
to: Optional[List[DataPayloadTo]] = None
|
|
193
|
+
|
|
194
|
+
type: Optional[Literal["SMS", "MMS"]] = None
|
|
195
|
+
"""The type of message. This value can be either 'sms' or 'mms'."""
|
|
196
|
+
|
|
197
|
+
valid_until: Optional[datetime] = None
|
|
198
|
+
"""Not used for inbound messages."""
|
|
199
|
+
|
|
200
|
+
webhook_failover_url: Optional[str] = None
|
|
201
|
+
"""
|
|
202
|
+
The failover URL where webhooks related to this message will be sent if sending
|
|
203
|
+
to the primary URL fails.
|
|
204
|
+
"""
|
|
205
|
+
|
|
206
|
+
webhook_url: Optional[str] = None
|
|
207
|
+
"""The URL where webhooks related to this message will be sent."""
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
class Data(BaseModel):
|
|
211
|
+
id: Optional[str] = None
|
|
212
|
+
"""Identifies the type of resource."""
|
|
213
|
+
|
|
214
|
+
event_type: Optional[Literal["message.received"]] = None
|
|
215
|
+
"""The type of event being delivered."""
|
|
216
|
+
|
|
217
|
+
occurred_at: Optional[datetime] = None
|
|
218
|
+
"""ISO 8601 formatted date indicating when the resource was created."""
|
|
219
|
+
|
|
220
|
+
payload: Optional[DataPayload] = None
|
|
221
|
+
|
|
222
|
+
record_type: Optional[Literal["event"]] = None
|
|
223
|
+
"""Identifies the type of the resource."""
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
class InboundMessageWebhookEvent(BaseModel):
|
|
227
|
+
data: Optional[Data] = None
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
from .number_block_order import NumberBlockOrder
|
|
7
|
+
|
|
8
|
+
__all__ = ["NumberOrderStatusUpdateWebhookEvent"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class NumberOrderStatusUpdateWebhookEvent(BaseModel):
|
|
12
|
+
data: Optional[NumberBlockOrder] = None
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["ReplacedLinkClickWebhookEvent", "Data"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Data(BaseModel):
|
|
12
|
+
message_id: Optional[str] = None
|
|
13
|
+
"""The message ID associated with the clicked link."""
|
|
14
|
+
|
|
15
|
+
record_type: Optional[str] = None
|
|
16
|
+
"""Identifies the type of the resource."""
|
|
17
|
+
|
|
18
|
+
time_clicked: Optional[datetime] = None
|
|
19
|
+
"""ISO 8601 formatted date indicating when the message request was received."""
|
|
20
|
+
|
|
21
|
+
to: Optional[str] = None
|
|
22
|
+
"""
|
|
23
|
+
Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short
|
|
24
|
+
code).
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
url: Optional[str] = None
|
|
28
|
+
"""The original link that was sent in the message."""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class ReplacedLinkClickWebhookEvent(BaseModel):
|
|
32
|
+
data: Optional[Data] = None
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Literal
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["SipHeader"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SipHeader(BaseModel):
|
|
11
|
+
name: Literal["User-to-User"]
|
|
12
|
+
"""The name of the header to add."""
|
|
13
|
+
|
|
14
|
+
value: str
|
|
15
|
+
"""The value of the header."""
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["StreamingFailedWebhookEvent", "Data", "DataPayload", "DataPayloadStreamParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DataPayloadStreamParams(BaseModel):
|
|
13
|
+
stream_url: Optional[str] = None
|
|
14
|
+
"""The destination WebSocket address where the stream is going to be delivered."""
|
|
15
|
+
|
|
16
|
+
track: Optional[Literal["inbound_track", "outbound_track", "both_tracks"]] = None
|
|
17
|
+
"""Specifies which track should be streamed."""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class DataPayload(BaseModel):
|
|
21
|
+
call_control_id: Optional[str] = None
|
|
22
|
+
"""Call ID used to issue commands via Call Control API."""
|
|
23
|
+
|
|
24
|
+
call_leg_id: Optional[str] = None
|
|
25
|
+
"""ID that is unique to the call and can be used to correlate webhook events."""
|
|
26
|
+
|
|
27
|
+
call_session_id: Optional[str] = None
|
|
28
|
+
"""
|
|
29
|
+
ID that is unique to the call session and can be used to correlate webhook
|
|
30
|
+
events. Call session is a group of related call legs that logically belong to
|
|
31
|
+
the same phone call, e.g. an inbound and outbound leg of a transferred call.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
client_state: Optional[str] = None
|
|
35
|
+
"""State received from a command."""
|
|
36
|
+
|
|
37
|
+
connection_id: Optional[str] = None
|
|
38
|
+
"""Call Control App ID (formerly Telnyx connection ID) used in the call."""
|
|
39
|
+
|
|
40
|
+
failure_reason: Optional[str] = None
|
|
41
|
+
"""A short description explaning why the media streaming failed."""
|
|
42
|
+
|
|
43
|
+
stream_id: Optional[str] = None
|
|
44
|
+
"""Identifies the streaming."""
|
|
45
|
+
|
|
46
|
+
stream_params: Optional[DataPayloadStreamParams] = None
|
|
47
|
+
"""Streaming parameters as they were originally given to the Call Control API."""
|
|
48
|
+
|
|
49
|
+
stream_type: Optional[Literal["websocket", "dialogflow"]] = None
|
|
50
|
+
"""The type of stream connection the stream is performing."""
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class Data(BaseModel):
|
|
54
|
+
id: Optional[str] = None
|
|
55
|
+
"""Identifies the type of resource."""
|
|
56
|
+
|
|
57
|
+
event_type: Optional[Literal["streaming.failed"]] = None
|
|
58
|
+
"""The type of event being delivered."""
|
|
59
|
+
|
|
60
|
+
occurred_at: Optional[datetime] = None
|
|
61
|
+
"""ISO 8601 datetime of when the event occurred."""
|
|
62
|
+
|
|
63
|
+
payload: Optional[DataPayload] = None
|
|
64
|
+
|
|
65
|
+
record_type: Optional[Literal["event"]] = None
|
|
66
|
+
"""Identifies the resource."""
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class StreamingFailedWebhookEvent(BaseModel):
|
|
70
|
+
data: Optional[Data] = None
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["StreamingStartedWebhookEvent", "Data", "DataPayload"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DataPayload(BaseModel):
|
|
13
|
+
call_control_id: Optional[str] = None
|
|
14
|
+
"""Call ID used to issue commands via Call Control API."""
|
|
15
|
+
|
|
16
|
+
call_leg_id: Optional[str] = None
|
|
17
|
+
"""ID that is unique to the call and can be used to correlate webhook events."""
|
|
18
|
+
|
|
19
|
+
call_session_id: Optional[str] = None
|
|
20
|
+
"""
|
|
21
|
+
ID that is unique to the call session and can be used to correlate webhook
|
|
22
|
+
events. Call session is a group of related call legs that logically belong to
|
|
23
|
+
the same phone call, e.g. an inbound and outbound leg of a transferred call.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
client_state: Optional[str] = None
|
|
27
|
+
"""State received from a command."""
|
|
28
|
+
|
|
29
|
+
connection_id: Optional[str] = None
|
|
30
|
+
"""Call Control App ID (formerly Telnyx connection ID) used in the call."""
|
|
31
|
+
|
|
32
|
+
stream_url: Optional[str] = None
|
|
33
|
+
"""Destination WebSocket address where the stream is going to be delivered."""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class Data(BaseModel):
|
|
37
|
+
id: Optional[str] = None
|
|
38
|
+
"""Identifies the type of resource."""
|
|
39
|
+
|
|
40
|
+
event_type: Optional[Literal["streaming.started"]] = None
|
|
41
|
+
"""The type of event being delivered."""
|
|
42
|
+
|
|
43
|
+
occurred_at: Optional[datetime] = None
|
|
44
|
+
"""ISO 8601 datetime of when the event occurred."""
|
|
45
|
+
|
|
46
|
+
payload: Optional[DataPayload] = None
|
|
47
|
+
|
|
48
|
+
record_type: Optional[Literal["event"]] = None
|
|
49
|
+
"""Identifies the type of the resource."""
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class StreamingStartedWebhookEvent(BaseModel):
|
|
53
|
+
data: Optional[Data] = None
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["StreamingStoppedWebhookEvent", "Data", "DataPayload"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DataPayload(BaseModel):
|
|
13
|
+
call_control_id: Optional[str] = None
|
|
14
|
+
"""Call ID used to issue commands via Call Control API."""
|
|
15
|
+
|
|
16
|
+
call_leg_id: Optional[str] = None
|
|
17
|
+
"""ID that is unique to the call and can be used to correlate webhook events."""
|
|
18
|
+
|
|
19
|
+
call_session_id: Optional[str] = None
|
|
20
|
+
"""
|
|
21
|
+
ID that is unique to the call session and can be used to correlate webhook
|
|
22
|
+
events. Call session is a group of related call legs that logically belong to
|
|
23
|
+
the same phone call, e.g. an inbound and outbound leg of a transferred call.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
client_state: Optional[str] = None
|
|
27
|
+
"""State received from a command."""
|
|
28
|
+
|
|
29
|
+
connection_id: Optional[str] = None
|
|
30
|
+
"""Call Control App ID (formerly Telnyx connection ID) used in the call."""
|
|
31
|
+
|
|
32
|
+
stream_url: Optional[str] = None
|
|
33
|
+
"""Destination WebSocket address where the stream is going to be delivered."""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class Data(BaseModel):
|
|
37
|
+
id: Optional[str] = None
|
|
38
|
+
"""Identifies the type of resource."""
|
|
39
|
+
|
|
40
|
+
event_type: Optional[Literal["streaming.stopped"]] = None
|
|
41
|
+
"""The type of event being delivered."""
|
|
42
|
+
|
|
43
|
+
occurred_at: Optional[datetime] = None
|
|
44
|
+
"""ISO 8601 datetime of when the event occurred."""
|
|
45
|
+
|
|
46
|
+
payload: Optional[DataPayload] = None
|
|
47
|
+
|
|
48
|
+
record_type: Optional[Literal["event"]] = None
|
|
49
|
+
"""Identifies the type of the resource."""
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class StreamingStoppedWebhookEvent(BaseModel):
|
|
53
|
+
data: Optional[Data] = None
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["TranscriptionWebhookEvent", "Data", "DataPayload", "DataPayloadTranscriptionData"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DataPayloadTranscriptionData(BaseModel):
|
|
13
|
+
confidence: Optional[float] = None
|
|
14
|
+
"""Speech recognition confidence level."""
|
|
15
|
+
|
|
16
|
+
is_final: Optional[bool] = None
|
|
17
|
+
"""When false, it means that this is an interim result."""
|
|
18
|
+
|
|
19
|
+
transcript: Optional[str] = None
|
|
20
|
+
"""Recognized text."""
|
|
21
|
+
|
|
22
|
+
transcription_track: Optional[Literal["inbound", "outbound"]] = None
|
|
23
|
+
"""Indicates which leg of the call has been transcribed.
|
|
24
|
+
|
|
25
|
+
This is only available when `transcription_engine` is set to `B`.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class DataPayload(BaseModel):
|
|
30
|
+
call_control_id: Optional[str] = None
|
|
31
|
+
"""Unique identifier and token for controlling the call."""
|
|
32
|
+
|
|
33
|
+
call_leg_id: Optional[str] = None
|
|
34
|
+
"""ID that is unique to the call and can be used to correlate webhook events."""
|
|
35
|
+
|
|
36
|
+
call_session_id: Optional[str] = None
|
|
37
|
+
"""
|
|
38
|
+
ID that is unique to the call session and can be used to correlate webhook
|
|
39
|
+
events. Call session is a group of related call legs that logically belong to
|
|
40
|
+
the same phone call, e.g. an inbound and outbound leg of a transferred call.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
client_state: Optional[str] = None
|
|
44
|
+
"""Use this field to add state to every subsequent webhook.
|
|
45
|
+
|
|
46
|
+
It must be a valid Base-64 encoded string.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
connection_id: Optional[str] = None
|
|
50
|
+
"""Call Control App ID (formerly Telnyx connection ID) used in the call."""
|
|
51
|
+
|
|
52
|
+
transcription_data: Optional[DataPayloadTranscriptionData] = None
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class Data(BaseModel):
|
|
56
|
+
id: Optional[str] = None
|
|
57
|
+
"""Identifies the type of resource."""
|
|
58
|
+
|
|
59
|
+
event_type: Optional[Literal["call.transcription"]] = None
|
|
60
|
+
"""The type of event being delivered."""
|
|
61
|
+
|
|
62
|
+
occurred_at: Optional[datetime] = None
|
|
63
|
+
"""ISO 8601 datetime of when the event occurred."""
|
|
64
|
+
|
|
65
|
+
payload: Optional[DataPayload] = None
|
|
66
|
+
|
|
67
|
+
record_type: Optional[Literal["event"]] = None
|
|
68
|
+
"""Identifies the type of the resource."""
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class TranscriptionWebhookEvent(BaseModel):
|
|
72
|
+
data: Optional[Data] = None
|