telnyx 3.5.0a0__py3-none-any.whl → 3.7.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.

Files changed (130) hide show
  1. telnyx/_client.py +53 -2
  2. telnyx/_version.py +1 -1
  3. telnyx/resources/__init__.py +70 -0
  4. telnyx/resources/ai/conversations/conversations.py +137 -3
  5. telnyx/resources/ai/conversations/messages.py +1 -134
  6. telnyx/resources/calls/actions.py +146 -146
  7. telnyx/resources/calls/calls.py +4 -10
  8. telnyx/resources/conferences/actions.py +8 -24
  9. telnyx/resources/conferences/conferences.py +2 -6
  10. telnyx/resources/legacy/__init__.py +33 -0
  11. telnyx/resources/legacy/legacy.py +102 -0
  12. telnyx/resources/legacy/reporting/__init__.py +47 -0
  13. telnyx/resources/legacy/reporting/batch_detail_records/__init__.py +61 -0
  14. telnyx/resources/legacy/reporting/batch_detail_records/batch_detail_records.py +166 -0
  15. telnyx/resources/legacy/reporting/batch_detail_records/messaging.py +481 -0
  16. telnyx/resources/legacy/reporting/batch_detail_records/speech_to_text.py +399 -0
  17. telnyx/resources/legacy/reporting/batch_detail_records/voice.py +538 -0
  18. telnyx/resources/legacy/reporting/reporting.py +134 -0
  19. telnyx/resources/legacy/reporting/usage_reports/__init__.py +61 -0
  20. telnyx/resources/legacy/reporting/usage_reports/messaging.py +471 -0
  21. telnyx/resources/legacy/reporting/usage_reports/number_lookup.py +464 -0
  22. telnyx/resources/legacy/reporting/usage_reports/usage_reports.py +288 -0
  23. telnyx/resources/legacy/reporting/usage_reports/voice.py +493 -0
  24. telnyx/resources/oauth.py +855 -0
  25. telnyx/resources/oauth_clients.py +711 -0
  26. telnyx/resources/oauth_grants.py +349 -0
  27. telnyx/resources/phone_numbers/jobs.py +12 -0
  28. telnyx/resources/porting_orders/porting_orders.py +20 -8
  29. telnyx/resources/sim_cards/sim_cards.py +3 -2
  30. telnyx/resources/verifications/verifications.py +10 -0
  31. telnyx/resources/verify_profiles.py +183 -1
  32. telnyx/resources/well_known.py +198 -0
  33. telnyx/types/__init__.py +41 -1
  34. telnyx/types/addresses/action_validate_response.py +2 -2
  35. telnyx/types/ai/__init__.py +1 -0
  36. telnyx/types/ai/{conversations/message_create_params.py → conversation_add_message_params.py} +4 -4
  37. telnyx/types/ai/conversations/__init__.py +0 -1
  38. telnyx/types/ai/inference_embedding_webhook_tool_params.py +2 -0
  39. telnyx/types/ai/inference_embedding_webhook_tool_params_param.py +2 -0
  40. telnyx/types/{error.py → api_error.py} +2 -2
  41. telnyx/types/call_dial_params.py +2 -3
  42. telnyx/types/calls/action_answer_params.py +1 -2
  43. telnyx/types/calls/action_gather_using_ai_params.py +5 -8
  44. telnyx/types/calls/action_start_streaming_params.py +4 -2
  45. telnyx/types/calls/action_transfer_params.py +50 -0
  46. telnyx/types/campaign_submit_appeal_response.py +0 -3
  47. telnyx/types/legacy/__init__.py +3 -0
  48. telnyx/types/legacy/reporting/__init__.py +10 -0
  49. telnyx/types/legacy/reporting/batch_detail_records/__init__.py +20 -0
  50. telnyx/types/legacy/reporting/batch_detail_records/messaging_create_params.py +77 -0
  51. telnyx/types/legacy/reporting/batch_detail_records/messaging_create_response.py +68 -0
  52. telnyx/types/legacy/reporting/batch_detail_records/messaging_delete_response.py +68 -0
  53. telnyx/types/legacy/reporting/batch_detail_records/messaging_list_response.py +80 -0
  54. telnyx/types/legacy/reporting/batch_detail_records/messaging_retrieve_response.py +68 -0
  55. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_create_params.py +19 -0
  56. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_create_response.py +31 -0
  57. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_delete_response.py +31 -0
  58. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_list_response.py +31 -0
  59. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_retrieve_response.py +31 -0
  60. telnyx/types/legacy/reporting/batch_detail_records/voice_create_params.py +79 -0
  61. telnyx/types/legacy/reporting/batch_detail_records/voice_create_response.py +91 -0
  62. telnyx/types/legacy/reporting/batch_detail_records/voice_delete_response.py +91 -0
  63. telnyx/types/legacy/reporting/batch_detail_records/voice_list_response.py +102 -0
  64. telnyx/types/legacy/reporting/batch_detail_records/voice_retrieve_fields_response.py +23 -0
  65. telnyx/types/legacy/reporting/batch_detail_records/voice_retrieve_response.py +91 -0
  66. telnyx/types/legacy/reporting/usage_report_retrieve_speech_to_text_params.py +17 -0
  67. telnyx/types/legacy/reporting/usage_report_retrieve_speech_to_text_response.py +11 -0
  68. telnyx/types/legacy/reporting/usage_reports/__init__.py +18 -0
  69. telnyx/types/legacy/reporting/usage_reports/messaging_create_params.py +29 -0
  70. telnyx/types/legacy/reporting/usage_reports/messaging_create_response.py +43 -0
  71. telnyx/types/legacy/reporting/usage_reports/messaging_delete_response.py +43 -0
  72. telnyx/types/legacy/reporting/usage_reports/messaging_list_params.py +15 -0
  73. telnyx/types/legacy/reporting/usage_reports/messaging_list_response.py +54 -0
  74. telnyx/types/legacy/reporting/usage_reports/messaging_retrieve_response.py +43 -0
  75. telnyx/types/legacy/reporting/usage_reports/number_lookup_create_params.py +26 -0
  76. telnyx/types/legacy/reporting/usage_reports/number_lookup_list_params.py +13 -0
  77. telnyx/types/legacy/reporting/usage_reports/voice_create_params.py +40 -0
  78. telnyx/types/legacy/reporting/usage_reports/voice_create_response.py +48 -0
  79. telnyx/types/legacy/reporting/usage_reports/voice_delete_response.py +48 -0
  80. telnyx/types/legacy/reporting/usage_reports/voice_list_params.py +15 -0
  81. telnyx/types/legacy/reporting/usage_reports/voice_list_response.py +59 -0
  82. telnyx/types/legacy/reporting/usage_reports/voice_retrieve_response.py +48 -0
  83. telnyx/types/number_order_status_update_webhook_event.py +30 -4
  84. telnyx/types/oauth_client_create_params.py +39 -0
  85. telnyx/types/oauth_client_create_response.py +63 -0
  86. telnyx/types/oauth_client_list_params.py +38 -0
  87. telnyx/types/oauth_client_list_response.py +79 -0
  88. telnyx/types/oauth_client_retrieve_response.py +63 -0
  89. telnyx/types/oauth_client_update_params.py +36 -0
  90. telnyx/types/oauth_client_update_response.py +63 -0
  91. telnyx/types/oauth_grant_delete_response.py +33 -0
  92. telnyx/types/oauth_grant_list_params.py +17 -0
  93. telnyx/types/oauth_grant_list_response.py +49 -0
  94. telnyx/types/oauth_grant_retrieve_response.py +33 -0
  95. telnyx/types/oauth_grants_params.py +15 -0
  96. telnyx/types/oauth_grants_response.py +10 -0
  97. telnyx/types/oauth_introspect_params.py +12 -0
  98. telnyx/types/oauth_introspect_response.py +30 -0
  99. telnyx/types/oauth_register_params.py +39 -0
  100. telnyx/types/oauth_register_response.py +45 -0
  101. telnyx/types/oauth_retrieve_authorize_params.py +30 -0
  102. telnyx/types/oauth_retrieve_jwks_response.py +25 -0
  103. telnyx/types/oauth_retrieve_response.py +47 -0
  104. telnyx/types/oauth_token_params.py +33 -0
  105. telnyx/types/oauth_token_response.py +25 -0
  106. telnyx/types/phone_number_delete_response.py +7 -0
  107. telnyx/types/phone_number_detailed.py +7 -0
  108. telnyx/types/phone_number_list_params.py +6 -0
  109. telnyx/types/phone_numbers/job_update_batch_params.py +7 -0
  110. telnyx/types/porting_order.py +3 -0
  111. telnyx/types/porting_order_create_params.py +3 -0
  112. telnyx/types/porting_order_list_params.py +52 -31
  113. telnyx/types/porting_order_update_params.py +2 -0
  114. telnyx/types/porting_orders/phone_number_configuration_list_params.py +19 -19
  115. telnyx/types/shared/simple_sim_card.py +15 -0
  116. telnyx/types/sim_card.py +12 -0
  117. telnyx/types/sim_card_update_params.py +2 -1
  118. telnyx/types/stream_bidirectional_codec.py +1 -1
  119. telnyx/types/stream_codec.py +1 -1
  120. telnyx/types/verification_trigger_call_params.py +7 -0
  121. telnyx/types/verify_profile_create_template_params.py +12 -0
  122. telnyx/types/verify_profile_create_template_response.py +17 -0
  123. telnyx/types/verify_profile_update_template_params.py +12 -0
  124. telnyx/types/verify_profile_update_template_response.py +17 -0
  125. telnyx/types/well_known_retrieve_authorization_server_metadata_response.py +42 -0
  126. telnyx/types/well_known_retrieve_protected_resource_metadata_response.py +15 -0
  127. {telnyx-3.5.0a0.dist-info → telnyx-3.7.0a0.dist-info}/METADATA +1 -1
  128. {telnyx-3.5.0a0.dist-info → telnyx-3.7.0a0.dist-info}/RECORD +130 -48
  129. {telnyx-3.5.0a0.dist-info → telnyx-3.7.0a0.dist-info}/WHEEL +0 -0
  130. {telnyx-3.5.0a0.dist-info → telnyx-3.7.0a0.dist-info}/licenses/LICENSE +0 -0
@@ -7,7 +7,6 @@ from .insight_list_params import InsightListParams as InsightListParams
7
7
  from .insight_create_params import InsightCreateParams as InsightCreateParams
8
8
  from .insight_list_response import InsightListResponse as InsightListResponse
9
9
  from .insight_update_params import InsightUpdateParams as InsightUpdateParams
10
- from .message_create_params import MessageCreateParams as MessageCreateParams
11
10
  from .message_list_response import MessageListResponse as MessageListResponse
12
11
  from .insight_template_group import InsightTemplateGroup as InsightTemplateGroup
13
12
  from .insight_template_detail import InsightTemplateDetail as InsightTemplateDetail
@@ -27,6 +27,8 @@ class Header(BaseModel):
27
27
  Note that we support mustache templating for the value. For example you can use
28
28
  `Bearer {{#integration_secret}}test-secret{{/integration_secret}}` to pass the
29
29
  value of the integration secret as the bearer token.
30
+ [Telnyx signature headers](https://developers.telnyx.com/docs/voice/programmable-voice/voice-api-webhooks)
31
+ will be automatically added to the request.
30
32
  """
31
33
 
32
34
 
@@ -29,6 +29,8 @@ class Header(TypedDict, total=False):
29
29
  Note that we support mustache templating for the value. For example you can use
30
30
  `Bearer {{#integration_secret}}test-secret{{/integration_secret}}` to pass the
31
31
  value of the integration secret as the bearer token.
32
+ [Telnyx signature headers](https://developers.telnyx.com/docs/voice/programmable-voice/voice-api-webhooks)
33
+ will be automatically added to the request.
32
34
  """
33
35
 
34
36
 
@@ -4,7 +4,7 @@ from typing import Dict, Optional
4
4
 
5
5
  from .._models import BaseModel
6
6
 
7
- __all__ = ["Error", "Source"]
7
+ __all__ = ["APIError", "Source"]
8
8
 
9
9
 
10
10
  class Source(BaseModel):
@@ -15,7 +15,7 @@ class Source(BaseModel):
15
15
  """JSON pointer (RFC6901) to the offending entity."""
16
16
 
17
17
 
18
- class Error(BaseModel):
18
+ class APIError(BaseModel):
19
19
  code: str
20
20
 
21
21
  title: str
@@ -225,7 +225,7 @@ class CallDialParams(TypedDict, total=False):
225
225
  stream_bidirectional_mode: StreamBidirectionalMode
226
226
  """Configures method of bidirectional streaming (mp3, rtp)."""
227
227
 
228
- stream_bidirectional_sampling_rate: Literal[8000, 16000, 48000]
228
+ stream_bidirectional_sampling_rate: Literal[8000, 16000, 22050, 24000, 48000]
229
229
  """Audio sampling rate."""
230
230
 
231
231
  stream_bidirectional_target_legs: StreamBidirectionalTargetLegs
@@ -235,8 +235,7 @@ class CallDialParams(TypedDict, total=False):
235
235
  """Specifies the codec to be used for the streamed audio.
236
236
 
237
237
  When set to 'default' or when transcoding is not possible, the codec from the
238
- call will be used. Currently, transcoding is only supported between PCMU and
239
- PCMA codecs.
238
+ call will be used.
240
239
  """
241
240
 
242
241
  stream_establish_before_call_originate: bool
@@ -124,8 +124,7 @@ class ActionAnswerParams(TypedDict, total=False):
124
124
  """Specifies the codec to be used for the streamed audio.
125
125
 
126
126
  When set to 'default' or when transcoding is not possible, the codec from the
127
- call will be used. Currently, transcoding is only supported between PCMU and
128
- PCMA codecs.
127
+ call will be used.
129
128
  """
130
129
 
131
130
  stream_track: Literal["inbound_track", "outbound_track", "both_tracks"]
@@ -67,20 +67,17 @@ class ActionGatherUsingAIParams(TypedDict, total=False):
67
67
  """Default is `false`.
68
68
 
69
69
  If set to `true`, the voice assistant will send updates to the message history
70
- via the `call.ai_gather.message_history_updated`
71
- [callback](https://developers.telnyx.com/api/call-control/call-gather-using-ai#callbacks)
72
- in real time as the message history is updated.
70
+ via the `call.ai_gather.message_history_updated` callback in real time as the
71
+ message history is updated.
73
72
  """
74
73
 
75
74
  send_partial_results: bool
76
75
  """Default is `false`.
77
76
 
78
77
  If set to `true`, the voice assistant will send partial results via the
79
- `call.ai_gather.partial_results`
80
- [callback](https://developers.telnyx.com/api/call-control/call-gather-using-ai#callbacks)
81
- in real time as individual fields are gathered. If set to `false`, the voice
82
- assistant will only send the final result via the `call.ai_gather.ended`
83
- callback.
78
+ `call.ai_gather.partial_results` callback in real time as individual fields are
79
+ gathered. If set to `false`, the voice assistant will only send the final result
80
+ via the `call.ai_gather.ended` callback.
84
81
  """
85
82
 
86
83
  transcription: TranscriptionConfigParam
@@ -41,6 +41,9 @@ class ActionStartStreamingParams(TypedDict, total=False):
41
41
  stream_bidirectional_mode: StreamBidirectionalMode
42
42
  """Configures method of bidirectional streaming (mp3, rtp)."""
43
43
 
44
+ stream_bidirectional_sampling_rate: Literal[8000, 16000, 22050, 24000, 48000]
45
+ """Audio sampling rate."""
46
+
44
47
  stream_bidirectional_target_legs: StreamBidirectionalTargetLegs
45
48
  """Specifies which call legs should receive the bidirectional stream audio."""
46
49
 
@@ -48,8 +51,7 @@ class ActionStartStreamingParams(TypedDict, total=False):
48
51
  """Specifies the codec to be used for the streamed audio.
49
52
 
50
53
  When set to 'default' or when transcoding is not possible, the codec from the
51
- call will be used. Currently, transcoding is only supported between PCMU and
52
- PCMA codecs.
54
+ call will be used.
53
55
  """
54
56
 
55
57
  stream_track: Literal["inbound_track", "outbound_track", "both_tracks"]
@@ -102,6 +102,56 @@ class ActionTransferParams(TypedDict, total=False):
102
102
  behavior is to hang up the leg.
103
103
  """
104
104
 
105
+ record: Literal["record-from-answer"]
106
+ """Start recording automatically after an event. Disabled by default."""
107
+
108
+ record_channels: Literal["single", "dual"]
109
+ """
110
+ Defines which channel should be recorded ('single' or 'dual') when `record` is
111
+ specified.
112
+ """
113
+
114
+ record_custom_file_name: str
115
+ """The custom recording file name to be used instead of the default `call_leg_id`.
116
+
117
+ Telnyx will still add a Unix timestamp suffix.
118
+ """
119
+
120
+ record_format: Literal["wav", "mp3"]
121
+ """
122
+ Defines the format of the recording ('wav' or 'mp3') when `record` is specified.
123
+ """
124
+
125
+ record_max_length: int
126
+ """
127
+ Defines the maximum length for the recording in seconds when `record` is
128
+ specified. The minimum value is 0. The maximum value is 43200. The default value
129
+ is 0 (infinite).
130
+ """
131
+
132
+ record_timeout_secs: int
133
+ """
134
+ The number of seconds that Telnyx will wait for the recording to be stopped if
135
+ silence is detected when `record` is specified. The timer only starts when the
136
+ speech is detected. Please note that call transcription is used to detect
137
+ silence and the related charge will be applied. The minimum value is 0. The
138
+ default value is 0 (infinite).
139
+ """
140
+
141
+ record_track: Literal["both", "inbound", "outbound"]
142
+ """The audio track to be recorded.
143
+
144
+ Can be either `both`, `inbound` or `outbound`. If only single track is specified
145
+ (`inbound`, `outbound`), `channels` configuration is ignored and it will be
146
+ recorded as mono (single channel).
147
+ """
148
+
149
+ record_trim: Literal["trim-silence"]
150
+ """
151
+ When set to `trim-silence`, silence will be removed from the beginning and end
152
+ of the recording.
153
+ """
154
+
105
155
  sip_auth_password: str
106
156
  """SIP Authentication password used for SIP challenges."""
107
157
 
@@ -11,6 +11,3 @@ __all__ = ["CampaignSubmitAppealResponse"]
11
11
  class CampaignSubmitAppealResponse(BaseModel):
12
12
  appealed_at: Optional[datetime] = None
13
13
  """Timestamp when the appeal was submitted"""
14
-
15
- previous_status: Optional[str] = None
16
- """Previous campaign status (currently always null)"""
@@ -0,0 +1,3 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
@@ -0,0 +1,10 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .usage_report_retrieve_speech_to_text_params import (
6
+ UsageReportRetrieveSpeechToTextParams as UsageReportRetrieveSpeechToTextParams,
7
+ )
8
+ from .usage_report_retrieve_speech_to_text_response import (
9
+ UsageReportRetrieveSpeechToTextResponse as UsageReportRetrieveSpeechToTextResponse,
10
+ )
@@ -0,0 +1,20 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .voice_create_params import VoiceCreateParams as VoiceCreateParams
6
+ from .voice_list_response import VoiceListResponse as VoiceListResponse
7
+ from .voice_create_response import VoiceCreateResponse as VoiceCreateResponse
8
+ from .voice_delete_response import VoiceDeleteResponse as VoiceDeleteResponse
9
+ from .messaging_create_params import MessagingCreateParams as MessagingCreateParams
10
+ from .messaging_list_response import MessagingListResponse as MessagingListResponse
11
+ from .voice_retrieve_response import VoiceRetrieveResponse as VoiceRetrieveResponse
12
+ from .messaging_create_response import MessagingCreateResponse as MessagingCreateResponse
13
+ from .messaging_delete_response import MessagingDeleteResponse as MessagingDeleteResponse
14
+ from .messaging_retrieve_response import MessagingRetrieveResponse as MessagingRetrieveResponse
15
+ from .speech_to_text_create_params import SpeechToTextCreateParams as SpeechToTextCreateParams
16
+ from .speech_to_text_list_response import SpeechToTextListResponse as SpeechToTextListResponse
17
+ from .speech_to_text_create_response import SpeechToTextCreateResponse as SpeechToTextCreateResponse
18
+ from .speech_to_text_delete_response import SpeechToTextDeleteResponse as SpeechToTextDeleteResponse
19
+ from .voice_retrieve_fields_response import VoiceRetrieveFieldsResponse as VoiceRetrieveFieldsResponse
20
+ from .speech_to_text_retrieve_response import SpeechToTextRetrieveResponse as SpeechToTextRetrieveResponse
@@ -0,0 +1,77 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union, Iterable
6
+ from datetime import datetime
7
+ from typing_extensions import Literal, Required, Annotated, TypedDict
8
+
9
+ from ....._types import SequenceNotStr
10
+ from ....._utils import PropertyInfo
11
+
12
+ __all__ = ["MessagingCreateParams", "Filter"]
13
+
14
+
15
+ class MessagingCreateParams(TypedDict, total=False):
16
+ end_time: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
17
+ """End time in ISO format.
18
+
19
+ Note: If end time includes the last 4 hours, some MDRs might not appear in this
20
+ report, due to wait time for downstream message delivery confirmation
21
+ """
22
+
23
+ start_time: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
24
+ """Start time in ISO format"""
25
+
26
+ connections: Iterable[int]
27
+ """List of connections to filter by"""
28
+
29
+ directions: Iterable[int]
30
+ """List of directions to filter by (Inbound = 1, Outbound = 2)"""
31
+
32
+ filters: Iterable[Filter]
33
+ """List of filters to apply"""
34
+
35
+ include_message_body: bool
36
+ """Whether to include message body in the report"""
37
+
38
+ managed_accounts: SequenceNotStr[str]
39
+ """List of managed accounts to include"""
40
+
41
+ profiles: SequenceNotStr[str]
42
+ """List of messaging profile IDs to filter by"""
43
+
44
+ record_types: Iterable[int]
45
+ """List of record types to filter by (Complete = 1, Incomplete = 2, Errors = 3)"""
46
+
47
+ report_name: str
48
+ """Name of the report"""
49
+
50
+ select_all_managed_accounts: bool
51
+ """Whether to select all managed accounts"""
52
+
53
+ timezone: str
54
+ """Timezone for the report"""
55
+
56
+
57
+ class Filter(TypedDict, total=False):
58
+ billing_group: str
59
+ """Billing group UUID to filter by"""
60
+
61
+ cld: str
62
+ """Called line identification (destination number)"""
63
+
64
+ cld_filter: Literal["contains", "starts_with", "ends_with"]
65
+ """Filter type for CLD matching"""
66
+
67
+ cli: str
68
+ """Calling line identification (caller ID)"""
69
+
70
+ cli_filter: Literal["contains", "starts_with", "ends_with"]
71
+ """Filter type for CLI matching"""
72
+
73
+ filter_type: Literal["and", "or"]
74
+ """Logical operator for combining filters"""
75
+
76
+ tags_list: str
77
+ """Tag name to filter by"""
@@ -0,0 +1,68 @@
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 ....._models import BaseModel
8
+
9
+ __all__ = ["MessagingCreateResponse", "Data", "DataFilter"]
10
+
11
+
12
+ class DataFilter(BaseModel):
13
+ billing_group: Optional[str] = None
14
+ """Billing group UUID to filter by"""
15
+
16
+ cld: Optional[str] = None
17
+ """Called line identification (destination number)"""
18
+
19
+ cld_filter: Optional[Literal["contains", "starts_with", "ends_with"]] = None
20
+ """Filter type for CLD matching"""
21
+
22
+ cli: Optional[str] = None
23
+ """Calling line identification (caller ID)"""
24
+
25
+ cli_filter: Optional[Literal["contains", "starts_with", "ends_with"]] = None
26
+ """Filter type for CLI matching"""
27
+
28
+ filter_type: Optional[Literal["and", "or"]] = None
29
+ """Logical operator for combining filters"""
30
+
31
+ tags_list: Optional[str] = None
32
+ """Tag name to filter by"""
33
+
34
+
35
+ class Data(BaseModel):
36
+ id: Optional[str] = None
37
+ """Identifies the resource"""
38
+
39
+ connections: Optional[List[int]] = None
40
+
41
+ created_at: Optional[datetime] = None
42
+
43
+ directions: Optional[List[Literal["INBOUND", "OUTBOUND"]]] = None
44
+
45
+ end_date: Optional[datetime] = None
46
+
47
+ filters: Optional[List[DataFilter]] = None
48
+
49
+ profiles: Optional[List[str]] = None
50
+ """List of messaging profile IDs"""
51
+
52
+ record_type: Optional[str] = None
53
+
54
+ record_types: Optional[List[Literal["INCOMPLETE", "COMPLETED", "ERRORS"]]] = None
55
+
56
+ report_name: Optional[str] = None
57
+
58
+ report_url: Optional[str] = None
59
+
60
+ start_date: Optional[datetime] = None
61
+
62
+ status: Optional[Literal["PENDING", "COMPLETE", "FAILED", "EXPIRED"]] = None
63
+
64
+ updated_at: Optional[datetime] = None
65
+
66
+
67
+ class MessagingCreateResponse(BaseModel):
68
+ data: Optional[Data] = None
@@ -0,0 +1,68 @@
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 ....._models import BaseModel
8
+
9
+ __all__ = ["MessagingDeleteResponse", "Data", "DataFilter"]
10
+
11
+
12
+ class DataFilter(BaseModel):
13
+ billing_group: Optional[str] = None
14
+ """Billing group UUID to filter by"""
15
+
16
+ cld: Optional[str] = None
17
+ """Called line identification (destination number)"""
18
+
19
+ cld_filter: Optional[Literal["contains", "starts_with", "ends_with"]] = None
20
+ """Filter type for CLD matching"""
21
+
22
+ cli: Optional[str] = None
23
+ """Calling line identification (caller ID)"""
24
+
25
+ cli_filter: Optional[Literal["contains", "starts_with", "ends_with"]] = None
26
+ """Filter type for CLI matching"""
27
+
28
+ filter_type: Optional[Literal["and", "or"]] = None
29
+ """Logical operator for combining filters"""
30
+
31
+ tags_list: Optional[str] = None
32
+ """Tag name to filter by"""
33
+
34
+
35
+ class Data(BaseModel):
36
+ id: Optional[str] = None
37
+ """Identifies the resource"""
38
+
39
+ connections: Optional[List[int]] = None
40
+
41
+ created_at: Optional[datetime] = None
42
+
43
+ directions: Optional[List[Literal["INBOUND", "OUTBOUND"]]] = None
44
+
45
+ end_date: Optional[datetime] = None
46
+
47
+ filters: Optional[List[DataFilter]] = None
48
+
49
+ profiles: Optional[List[str]] = None
50
+ """List of messaging profile IDs"""
51
+
52
+ record_type: Optional[str] = None
53
+
54
+ record_types: Optional[List[Literal["INCOMPLETE", "COMPLETED", "ERRORS"]]] = None
55
+
56
+ report_name: Optional[str] = None
57
+
58
+ report_url: Optional[str] = None
59
+
60
+ start_date: Optional[datetime] = None
61
+
62
+ status: Optional[Literal["PENDING", "COMPLETE", "FAILED", "EXPIRED"]] = None
63
+
64
+ updated_at: Optional[datetime] = None
65
+
66
+
67
+ class MessagingDeleteResponse(BaseModel):
68
+ data: Optional[Data] = None
@@ -0,0 +1,80 @@
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 ....._models import BaseModel
8
+
9
+ __all__ = ["MessagingListResponse", "Data", "DataFilter", "Meta"]
10
+
11
+
12
+ class DataFilter(BaseModel):
13
+ billing_group: Optional[str] = None
14
+ """Billing group UUID to filter by"""
15
+
16
+ cld: Optional[str] = None
17
+ """Called line identification (destination number)"""
18
+
19
+ cld_filter: Optional[Literal["contains", "starts_with", "ends_with"]] = None
20
+ """Filter type for CLD matching"""
21
+
22
+ cli: Optional[str] = None
23
+ """Calling line identification (caller ID)"""
24
+
25
+ cli_filter: Optional[Literal["contains", "starts_with", "ends_with"]] = None
26
+ """Filter type for CLI matching"""
27
+
28
+ filter_type: Optional[Literal["and", "or"]] = None
29
+ """Logical operator for combining filters"""
30
+
31
+ tags_list: Optional[str] = None
32
+ """Tag name to filter by"""
33
+
34
+
35
+ class Data(BaseModel):
36
+ id: Optional[str] = None
37
+ """Identifies the resource"""
38
+
39
+ connections: Optional[List[int]] = None
40
+
41
+ created_at: Optional[datetime] = None
42
+
43
+ directions: Optional[List[Literal["INBOUND", "OUTBOUND"]]] = None
44
+
45
+ end_date: Optional[datetime] = None
46
+
47
+ filters: Optional[List[DataFilter]] = None
48
+
49
+ profiles: Optional[List[str]] = None
50
+ """List of messaging profile IDs"""
51
+
52
+ record_type: Optional[str] = None
53
+
54
+ record_types: Optional[List[Literal["INCOMPLETE", "COMPLETED", "ERRORS"]]] = None
55
+
56
+ report_name: Optional[str] = None
57
+
58
+ report_url: Optional[str] = None
59
+
60
+ start_date: Optional[datetime] = None
61
+
62
+ status: Optional[Literal["PENDING", "COMPLETE", "FAILED", "EXPIRED"]] = None
63
+
64
+ updated_at: Optional[datetime] = None
65
+
66
+
67
+ class Meta(BaseModel):
68
+ page_number: Optional[int] = None
69
+
70
+ page_size: Optional[int] = None
71
+
72
+ total_pages: Optional[int] = None
73
+
74
+ total_results: Optional[int] = None
75
+
76
+
77
+ class MessagingListResponse(BaseModel):
78
+ data: Optional[List[Data]] = None
79
+
80
+ meta: Optional[Meta] = None
@@ -0,0 +1,68 @@
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 ....._models import BaseModel
8
+
9
+ __all__ = ["MessagingRetrieveResponse", "Data", "DataFilter"]
10
+
11
+
12
+ class DataFilter(BaseModel):
13
+ billing_group: Optional[str] = None
14
+ """Billing group UUID to filter by"""
15
+
16
+ cld: Optional[str] = None
17
+ """Called line identification (destination number)"""
18
+
19
+ cld_filter: Optional[Literal["contains", "starts_with", "ends_with"]] = None
20
+ """Filter type for CLD matching"""
21
+
22
+ cli: Optional[str] = None
23
+ """Calling line identification (caller ID)"""
24
+
25
+ cli_filter: Optional[Literal["contains", "starts_with", "ends_with"]] = None
26
+ """Filter type for CLI matching"""
27
+
28
+ filter_type: Optional[Literal["and", "or"]] = None
29
+ """Logical operator for combining filters"""
30
+
31
+ tags_list: Optional[str] = None
32
+ """Tag name to filter by"""
33
+
34
+
35
+ class Data(BaseModel):
36
+ id: Optional[str] = None
37
+ """Identifies the resource"""
38
+
39
+ connections: Optional[List[int]] = None
40
+
41
+ created_at: Optional[datetime] = None
42
+
43
+ directions: Optional[List[Literal["INBOUND", "OUTBOUND"]]] = None
44
+
45
+ end_date: Optional[datetime] = None
46
+
47
+ filters: Optional[List[DataFilter]] = None
48
+
49
+ profiles: Optional[List[str]] = None
50
+ """List of messaging profile IDs"""
51
+
52
+ record_type: Optional[str] = None
53
+
54
+ record_types: Optional[List[Literal["INCOMPLETE", "COMPLETED", "ERRORS"]]] = None
55
+
56
+ report_name: Optional[str] = None
57
+
58
+ report_url: Optional[str] = None
59
+
60
+ start_date: Optional[datetime] = None
61
+
62
+ status: Optional[Literal["PENDING", "COMPLETE", "FAILED", "EXPIRED"]] = None
63
+
64
+ updated_at: Optional[datetime] = None
65
+
66
+
67
+ class MessagingRetrieveResponse(BaseModel):
68
+ data: Optional[Data] = None
@@ -0,0 +1,19 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union
6
+ from datetime import datetime
7
+ from typing_extensions import Required, Annotated, TypedDict
8
+
9
+ from ....._utils import PropertyInfo
10
+
11
+ __all__ = ["SpeechToTextCreateParams"]
12
+
13
+
14
+ class SpeechToTextCreateParams(TypedDict, total=False):
15
+ end_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
16
+ """End date in ISO format with timezone (date range must be up to one month)"""
17
+
18
+ start_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
19
+ """Start date in ISO format with timezone"""
@@ -0,0 +1,31 @@
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__ = ["SpeechToTextCreateResponse", "Data"]
10
+
11
+
12
+ class Data(BaseModel):
13
+ id: Optional[str] = None
14
+ """Identifies the resource"""
15
+
16
+ created_at: Optional[datetime] = None
17
+
18
+ download_link: Optional[str] = None
19
+ """URL to download the report"""
20
+
21
+ end_date: Optional[datetime] = None
22
+
23
+ record_type: Optional[str] = None
24
+
25
+ start_date: Optional[datetime] = None
26
+
27
+ status: Optional[Literal["PENDING", "COMPLETE", "FAILED", "EXPIRED"]] = None
28
+
29
+
30
+ class SpeechToTextCreateResponse(BaseModel):
31
+ data: Optional[Data] = None