telnyx 3.5.0__py3-none-any.whl → 3.6.0__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 (66) hide show
  1. telnyx/_version.py +1 -1
  2. telnyx/resources/ai/assistants/assistants.py +13 -15
  3. telnyx/resources/ai/assistants/versions.py +13 -15
  4. telnyx/resources/calls/actions.py +4 -2
  5. telnyx/resources/calls/calls.py +4 -2
  6. telnyx/resources/documents.py +242 -37
  7. telnyx/resources/messaging_tollfree/verification/requests.py +6 -9
  8. telnyx/resources/verify_profiles.py +9 -10
  9. telnyx/types/__init__.py +8 -6
  10. telnyx/types/access_ip_address_list_response.py +3 -12
  11. telnyx/types/access_ip_range_list_response.py +3 -12
  12. telnyx/types/ai/__init__.py +1 -3
  13. telnyx/types/ai/assistants/__init__.py +0 -3
  14. telnyx/types/ai/assistants_list.py +4 -88
  15. telnyx/types/ai/{assistant_clone_response.py → inference_embedding.py} +2 -2
  16. telnyx/types/call_dial_params.py +2 -1
  17. telnyx/types/calls/__init__.py +1 -0
  18. telnyx/types/calls/action_start_streaming_params.py +2 -1
  19. telnyx/types/calls/action_start_transcription_params.py +2 -102
  20. telnyx/types/calls/telnyx_transcription_language.py +108 -0
  21. telnyx/types/calls/transcription_engine_b_config_param.py +3 -102
  22. telnyx/types/calls/transcription_start_request_param.py +2 -102
  23. telnyx/types/document_upload_json_params.py +39 -0
  24. telnyx/types/document_upload_json_response.py +12 -0
  25. telnyx/types/legacy/reporting/batch_detail_records/__init__.py +1 -0
  26. telnyx/types/legacy/reporting/batch_detail_records/batch_csv_pagination_meta.py +17 -0
  27. telnyx/types/legacy/reporting/batch_detail_records/messaging_list_response.py +3 -12
  28. telnyx/types/legacy/reporting/batch_detail_records/voice_list_response.py +3 -12
  29. telnyx/types/legacy/reporting/usage_reports/__init__.py +1 -0
  30. telnyx/types/legacy/reporting/usage_reports/messaging_list_response.py +3 -12
  31. telnyx/types/legacy/reporting/usage_reports/standard_pagination_meta.py +17 -0
  32. telnyx/types/legacy/reporting/usage_reports/voice_list_response.py +3 -12
  33. telnyx/types/{verify_profile_create_template_response.py → message_template.py} +2 -2
  34. telnyx/types/messaging_tollfree/verification/__init__.py +1 -0
  35. telnyx/types/messaging_tollfree/verification/request_create_params.py +3 -5
  36. telnyx/types/messaging_tollfree/verification/request_update_params.py +3 -5
  37. telnyx/types/messaging_tollfree/verification/toll_free_verification_entity_type.py +9 -0
  38. telnyx/types/messaging_tollfree/verification/verification_request_egress.py +2 -4
  39. telnyx/types/messaging_tollfree/verification/verification_request_status.py +2 -4
  40. telnyx/types/oauth_client_list_response.py +3 -16
  41. telnyx/types/oauth_grant_list_response.py +3 -16
  42. telnyx/types/pagination_meta_cloudflare_ip_list_sync.py +15 -0
  43. telnyx/types/pagination_meta_oauth.py +21 -0
  44. telnyx/types/phone_number_blocks/__init__.py +1 -0
  45. telnyx/types/phone_number_blocks/job.py +3 -34
  46. telnyx/types/phone_number_blocks/job_error.py +32 -0
  47. telnyx/types/phone_numbers/phone_numbers_job.py +3 -36
  48. telnyx/types/report_list_mdrs_response.py +3 -12
  49. telnyx/types/reports/__init__.py +1 -0
  50. telnyx/types/reports/mdr_usage_report_list_response.py +3 -12
  51. telnyx/types/reports/pagination_meta_reporting.py +17 -0
  52. telnyx/types/stream_bidirectional_sampling_rate.py +7 -0
  53. telnyx/types/verifications/__init__.py +1 -0
  54. telnyx/types/verifications/by_phone_number_list_response.py +4 -13
  55. telnyx/types/verifications/verify_meta.py +17 -0
  56. telnyx/types/verify_profile_list_response.py +4 -13
  57. {telnyx-3.5.0.dist-info → telnyx-3.6.0.dist-info}/METADATA +2 -2
  58. {telnyx-3.5.0.dist-info → telnyx-3.6.0.dist-info}/RECORD +60 -54
  59. telnyx/types/ai/assistant_create_response.py +0 -92
  60. telnyx/types/ai/assistant_retrieve_response.py +0 -92
  61. telnyx/types/ai/assistants/version_promote_response.py +0 -92
  62. telnyx/types/ai/assistants/version_retrieve_response.py +0 -92
  63. telnyx/types/ai/assistants/version_update_response.py +0 -92
  64. telnyx/types/verify_profile_update_template_response.py +0 -12
  65. {telnyx-3.5.0.dist-info → telnyx-3.6.0.dist-info}/WHEEL +0 -0
  66. {telnyx-3.5.0.dist-info → telnyx-3.6.0.dist-info}/licenses/LICENSE +0 -0
@@ -2,7 +2,6 @@
2
2
 
3
3
  from typing import List, Optional
4
4
  from datetime import datetime
5
- from typing_extensions import Literal
6
5
 
7
6
  from pydantic import Field as FieldInfo
8
7
 
@@ -12,6 +11,7 @@ from ...._models import BaseModel
12
11
  from .tf_phone_number import TfPhoneNumber
13
12
  from .use_case_categories import UseCaseCategories
14
13
  from .tf_verification_status import TfVerificationStatus
14
+ from .toll_free_verification_entity_type import TollFreeVerificationEntityType
15
15
 
16
16
  __all__ = ["VerificationRequestStatus"]
17
17
 
@@ -76,9 +76,7 @@ class VerificationRequestStatus(BaseModel):
76
76
 
77
77
  doing_business_as: Optional[str] = FieldInfo(alias="doingBusinessAs", default=None)
78
78
 
79
- entity_type: Optional[Literal["SOLE_PROPRIETOR", "PRIVATE_PROFIT", "PUBLIC_PROFIT", "NON_PROFIT", "GOVERNMENT"]] = (
80
- FieldInfo(alias="entityType", default=None)
81
- )
79
+ entity_type: Optional[TollFreeVerificationEntityType] = FieldInfo(alias="entityType", default=None)
82
80
  """Business entity classification"""
83
81
 
84
82
  help_message_response: Optional[str] = FieldInfo(alias="helpMessageResponse", default=None)
@@ -4,25 +4,12 @@ from typing import List, Optional
4
4
 
5
5
  from .._models import BaseModel
6
6
  from .oauth_client import OAuthClient
7
+ from .pagination_meta_oauth import PaginationMetaOAuth
7
8
 
8
- __all__ = ["OAuthClientListResponse", "Meta"]
9
-
10
-
11
- class Meta(BaseModel):
12
- page_number: Optional[int] = None
13
- """Current page number"""
14
-
15
- page_size: Optional[int] = None
16
- """Number of items per page"""
17
-
18
- total_pages: Optional[int] = None
19
- """Total number of pages"""
20
-
21
- total_results: Optional[int] = None
22
- """Total number of results"""
9
+ __all__ = ["OAuthClientListResponse"]
23
10
 
24
11
 
25
12
  class OAuthClientListResponse(BaseModel):
26
13
  data: Optional[List[OAuthClient]] = None
27
14
 
28
- meta: Optional[Meta] = None
15
+ meta: Optional[PaginationMetaOAuth] = None
@@ -4,25 +4,12 @@ from typing import List, Optional
4
4
 
5
5
  from .._models import BaseModel
6
6
  from .oauth_grant import OAuthGrant
7
+ from .pagination_meta_oauth import PaginationMetaOAuth
7
8
 
8
- __all__ = ["OAuthGrantListResponse", "Meta"]
9
-
10
-
11
- class Meta(BaseModel):
12
- page_number: Optional[int] = None
13
- """Current page number"""
14
-
15
- page_size: Optional[int] = None
16
- """Number of items per page"""
17
-
18
- total_pages: Optional[int] = None
19
- """Total number of pages"""
20
-
21
- total_results: Optional[int] = None
22
- """Total number of results"""
9
+ __all__ = ["OAuthGrantListResponse"]
23
10
 
24
11
 
25
12
  class OAuthGrantListResponse(BaseModel):
26
13
  data: Optional[List[OAuthGrant]] = None
27
14
 
28
- meta: Optional[Meta] = None
15
+ meta: Optional[PaginationMetaOAuth] = None
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .._models import BaseModel
4
+
5
+ __all__ = ["PaginationMetaCloudflareIPListSync"]
6
+
7
+
8
+ class PaginationMetaCloudflareIPListSync(BaseModel):
9
+ page_number: int
10
+
11
+ page_size: int
12
+
13
+ total_pages: int
14
+
15
+ total_results: int
@@ -0,0 +1,21 @@
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
+
7
+ __all__ = ["PaginationMetaOAuth"]
8
+
9
+
10
+ class PaginationMetaOAuth(BaseModel):
11
+ page_number: Optional[int] = None
12
+ """Current page number"""
13
+
14
+ page_size: Optional[int] = None
15
+ """Number of items per page"""
16
+
17
+ total_pages: Optional[int] = None
18
+ """Total number of pages"""
19
+
20
+ total_results: Optional[int] = None
21
+ """Total number of results"""
@@ -3,6 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from .job import Job as Job
6
+ from .job_error import JobError as JobError
6
7
  from .job_list_params import JobListParams as JobListParams
7
8
  from .job_list_response import JobListResponse as JobListResponse
8
9
  from .job_retrieve_response import JobRetrieveResponse as JobRetrieveResponse
@@ -5,47 +5,16 @@ from datetime import datetime
5
5
  from typing_extensions import Literal
6
6
 
7
7
  from ..._models import BaseModel
8
+ from .job_error import JobError
8
9
 
9
- __all__ = [
10
- "Job",
11
- "FailedOperation",
12
- "FailedOperationError",
13
- "FailedOperationErrorMeta",
14
- "FailedOperationErrorSource",
15
- "SuccessfulOperation",
16
- ]
17
-
18
-
19
- class FailedOperationErrorMeta(BaseModel):
20
- url: Optional[str] = None
21
- """URL with additional information on the error."""
22
-
23
-
24
- class FailedOperationErrorSource(BaseModel):
25
- parameter: Optional[str] = None
26
- """Indicates which query parameter caused the error."""
27
-
28
- pointer: Optional[str] = None
29
- """JSON pointer (RFC6901) to the offending entity."""
30
-
31
-
32
- class FailedOperationError(BaseModel):
33
- code: str
34
-
35
- title: str
36
-
37
- detail: Optional[str] = None
38
-
39
- meta: Optional[FailedOperationErrorMeta] = None
40
-
41
- source: Optional[FailedOperationErrorSource] = None
10
+ __all__ = ["Job", "FailedOperation", "SuccessfulOperation"]
42
11
 
43
12
 
44
13
  class FailedOperation(BaseModel):
45
14
  id: Optional[str] = None
46
15
  """The phone number's ID"""
47
16
 
48
- errors: Optional[List[FailedOperationError]] = None
17
+ errors: Optional[List[JobError]] = None
49
18
 
50
19
  phone_number: Optional[str] = None
51
20
  """The phone number in e164 format."""
@@ -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
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["JobError", "Meta", "Source"]
8
+
9
+
10
+ class Meta(BaseModel):
11
+ url: Optional[str] = None
12
+ """URL with additional information on the error."""
13
+
14
+
15
+ class Source(BaseModel):
16
+ parameter: Optional[str] = None
17
+ """Indicates which query parameter caused the error."""
18
+
19
+ pointer: Optional[str] = None
20
+ """JSON pointer (RFC6901) to the offending entity."""
21
+
22
+
23
+ class JobError(BaseModel):
24
+ code: str
25
+
26
+ title: str
27
+
28
+ detail: Optional[str] = None
29
+
30
+ meta: Optional[Meta] = None
31
+
32
+ source: Optional[Source] = None
@@ -5,49 +5,16 @@ from datetime import datetime
5
5
  from typing_extensions import Literal
6
6
 
7
7
  from ..._models import BaseModel
8
+ from ..phone_number_blocks.job_error import JobError
8
9
 
9
- __all__ = [
10
- "PhoneNumbersJob",
11
- "FailedOperation",
12
- "FailedOperationError",
13
- "FailedOperationErrorMeta",
14
- "FailedOperationErrorSource",
15
- "PendingOperation",
16
- "PhoneNumber",
17
- "SuccessfulOperation",
18
- ]
19
-
20
-
21
- class FailedOperationErrorMeta(BaseModel):
22
- url: Optional[str] = None
23
- """URL with additional information on the error."""
24
-
25
-
26
- class FailedOperationErrorSource(BaseModel):
27
- parameter: Optional[str] = None
28
- """Indicates which query parameter caused the error."""
29
-
30
- pointer: Optional[str] = None
31
- """JSON pointer (RFC6901) to the offending entity."""
32
-
33
-
34
- class FailedOperationError(BaseModel):
35
- code: str
36
-
37
- title: str
38
-
39
- detail: Optional[str] = None
40
-
41
- meta: Optional[FailedOperationErrorMeta] = None
42
-
43
- source: Optional[FailedOperationErrorSource] = None
10
+ __all__ = ["PhoneNumbersJob", "FailedOperation", "PendingOperation", "PhoneNumber", "SuccessfulOperation"]
44
11
 
45
12
 
46
13
  class FailedOperation(BaseModel):
47
14
  id: Optional[str] = None
48
15
  """The phone number's ID"""
49
16
 
50
- errors: Optional[List[FailedOperationError]] = None
17
+ errors: Optional[List[JobError]] = None
51
18
 
52
19
  phone_number: Optional[str] = None
53
20
  """The phone number in e164 format."""
@@ -5,8 +5,9 @@ from datetime import datetime
5
5
  from typing_extensions import Literal
6
6
 
7
7
  from .._models import BaseModel
8
+ from .reports.pagination_meta_reporting import PaginationMetaReporting
8
9
 
9
- __all__ = ["ReportListMdrsResponse", "Data", "Meta"]
10
+ __all__ = ["ReportListMdrsResponse", "Data"]
10
11
 
11
12
 
12
13
  class Data(BaseModel):
@@ -58,17 +59,7 @@ class Data(BaseModel):
58
59
  """Message status"""
59
60
 
60
61
 
61
- class Meta(BaseModel):
62
- page_number: Optional[int] = None
63
-
64
- page_size: Optional[int] = None
65
-
66
- total_pages: Optional[int] = None
67
-
68
- total_results: Optional[int] = None
69
-
70
-
71
62
  class ReportListMdrsResponse(BaseModel):
72
63
  data: Optional[List[Data]] = None
73
64
 
74
- meta: Optional[Meta] = None
65
+ meta: Optional[PaginationMetaReporting] = None
@@ -3,6 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from .mdr_usage_report import MdrUsageReport as MdrUsageReport
6
+ from .pagination_meta_reporting import PaginationMetaReporting as PaginationMetaReporting
6
7
  from .mdr_usage_report_list_params import MdrUsageReportListParams as MdrUsageReportListParams
7
8
  from .mdr_usage_report_create_params import MdrUsageReportCreateParams as MdrUsageReportCreateParams
8
9
  from .mdr_usage_report_list_response import MdrUsageReportListResponse as MdrUsageReportListResponse
@@ -4,21 +4,12 @@ from typing import List, Optional
4
4
 
5
5
  from ..._models import BaseModel
6
6
  from .mdr_usage_report import MdrUsageReport
7
+ from .pagination_meta_reporting import PaginationMetaReporting
7
8
 
8
- __all__ = ["MdrUsageReportListResponse", "Meta"]
9
-
10
-
11
- class Meta(BaseModel):
12
- page_number: Optional[int] = None
13
-
14
- page_size: Optional[int] = None
15
-
16
- total_pages: Optional[int] = None
17
-
18
- total_results: Optional[int] = None
9
+ __all__ = ["MdrUsageReportListResponse"]
19
10
 
20
11
 
21
12
  class MdrUsageReportListResponse(BaseModel):
22
13
  data: Optional[List[MdrUsageReport]] = None
23
14
 
24
- meta: Optional[Meta] = None
15
+ meta: Optional[PaginationMetaReporting] = None
@@ -0,0 +1,17 @@
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
+
7
+ __all__ = ["PaginationMetaReporting"]
8
+
9
+
10
+ class PaginationMetaReporting(BaseModel):
11
+ page_number: Optional[int] = None
12
+
13
+ page_size: Optional[int] = None
14
+
15
+ total_pages: Optional[int] = None
16
+
17
+ total_results: Optional[int] = None
@@ -0,0 +1,7 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal, TypeAlias
4
+
5
+ __all__ = ["StreamBidirectionalSamplingRate"]
6
+
7
+ StreamBidirectionalSamplingRate: TypeAlias = Literal[8000, 16000, 22050, 24000, 48000]
@@ -2,5 +2,6 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from .verify_meta import VerifyMeta as VerifyMeta
5
6
  from .action_verify_params import ActionVerifyParams as ActionVerifyParams
6
7
  from .by_phone_number_list_response import ByPhoneNumberListResponse as ByPhoneNumberListResponse
@@ -1,24 +1,15 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import List, Optional
3
+ from typing import List
4
4
 
5
5
  from ..._models import BaseModel
6
+ from .verify_meta import VerifyMeta
6
7
  from ..verification import Verification
7
8
 
8
- __all__ = ["ByPhoneNumberListResponse", "Meta"]
9
-
10
-
11
- class Meta(BaseModel):
12
- page_number: Optional[int] = None
13
-
14
- page_size: Optional[int] = None
15
-
16
- total_pages: Optional[int] = None
17
-
18
- total_results: Optional[int] = None
9
+ __all__ = ["ByPhoneNumberListResponse"]
19
10
 
20
11
 
21
12
  class ByPhoneNumberListResponse(BaseModel):
22
13
  data: List[Verification]
23
14
 
24
- meta: Meta
15
+ meta: VerifyMeta
@@ -0,0 +1,17 @@
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
+
7
+ __all__ = ["VerifyMeta"]
8
+
9
+
10
+ class VerifyMeta(BaseModel):
11
+ page_number: Optional[int] = None
12
+
13
+ page_size: Optional[int] = None
14
+
15
+ total_pages: Optional[int] = None
16
+
17
+ total_results: Optional[int] = None
@@ -1,24 +1,15 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import List, Optional
3
+ from typing import List
4
4
 
5
5
  from .._models import BaseModel
6
6
  from .verify_profile import VerifyProfile
7
+ from .verifications.verify_meta import VerifyMeta
7
8
 
8
- __all__ = ["VerifyProfileListResponse", "Meta"]
9
-
10
-
11
- class Meta(BaseModel):
12
- page_number: Optional[int] = None
13
-
14
- page_size: Optional[int] = None
15
-
16
- total_pages: Optional[int] = None
17
-
18
- total_results: Optional[int] = None
9
+ __all__ = ["VerifyProfileListResponse"]
19
10
 
20
11
 
21
12
  class VerifyProfileListResponse(BaseModel):
22
13
  data: List[VerifyProfile]
23
14
 
24
- meta: Meta
15
+ meta: VerifyMeta
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: telnyx
3
- Version: 3.5.0
3
+ Version: 3.6.0
4
4
  Summary: The official Python library for the telnyx API
5
5
  Project-URL: Homepage, https://github.com/team-telnyx/telnyx-python
6
6
  Project-URL: Repository, https://github.com/team-telnyx/telnyx-python
@@ -30,7 +30,7 @@ Requires-Dist: sniffio
30
30
  Requires-Dist: typing-extensions<5,>=4.10
31
31
  Provides-Extra: aiohttp
32
32
  Requires-Dist: aiohttp; extra == 'aiohttp'
33
- Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
33
+ Requires-Dist: httpx-aiohttp>=0.1.9; extra == 'aiohttp'
34
34
  Description-Content-Type: text/markdown
35
35
 
36
36
  # Telnyx Python API library