telnyx 3.1.0a0__py3-none-any.whl → 3.2.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/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "telnyx"
4
- __version__ = "3.1.0-alpha" # x-release-please-version
4
+ __version__ = "3.2.0-alpha" # x-release-please-version
@@ -32,6 +32,7 @@ from ..types.document_delete_response import DocumentDeleteResponse
32
32
  from ..types.document_update_response import DocumentUpdateResponse
33
33
  from ..types.document_upload_response import DocumentUploadResponse
34
34
  from ..types.document_retrieve_response import DocumentRetrieveResponse
35
+ from ..types.document_generate_download_link_response import DocumentGenerateDownloadLinkResponse
35
36
 
36
37
  __all__ = ["DocumentsResource", "AsyncDocumentsResource"]
37
38
 
@@ -259,6 +260,40 @@ class DocumentsResource(SyncAPIResource):
259
260
  cast_to=BinaryAPIResponse,
260
261
  )
261
262
 
263
+ def generate_download_link(
264
+ self,
265
+ id: str,
266
+ *,
267
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
268
+ # The extra values given here take precedence over values defined on the client or passed to this method.
269
+ extra_headers: Headers | None = None,
270
+ extra_query: Query | None = None,
271
+ extra_body: Body | None = None,
272
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
273
+ ) -> DocumentGenerateDownloadLinkResponse:
274
+ """
275
+ Generates a temporary pre-signed URL that can be used to download the document
276
+ directly from the storage backend without authentication.
277
+
278
+ Args:
279
+ extra_headers: Send extra headers
280
+
281
+ extra_query: Add additional query parameters to the request
282
+
283
+ extra_body: Add additional JSON properties to the request
284
+
285
+ timeout: Override the client-level default timeout for this request, in seconds
286
+ """
287
+ if not id:
288
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
289
+ return self._get(
290
+ f"/documents/{id}/download_link",
291
+ options=make_request_options(
292
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
293
+ ),
294
+ cast_to=DocumentGenerateDownloadLinkResponse,
295
+ )
296
+
262
297
  @overload
263
298
  def upload(
264
299
  self,
@@ -593,6 +628,40 @@ class AsyncDocumentsResource(AsyncAPIResource):
593
628
  cast_to=AsyncBinaryAPIResponse,
594
629
  )
595
630
 
631
+ async def generate_download_link(
632
+ self,
633
+ id: str,
634
+ *,
635
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
636
+ # The extra values given here take precedence over values defined on the client or passed to this method.
637
+ extra_headers: Headers | None = None,
638
+ extra_query: Query | None = None,
639
+ extra_body: Body | None = None,
640
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
641
+ ) -> DocumentGenerateDownloadLinkResponse:
642
+ """
643
+ Generates a temporary pre-signed URL that can be used to download the document
644
+ directly from the storage backend without authentication.
645
+
646
+ Args:
647
+ extra_headers: Send extra headers
648
+
649
+ extra_query: Add additional query parameters to the request
650
+
651
+ extra_body: Add additional JSON properties to the request
652
+
653
+ timeout: Override the client-level default timeout for this request, in seconds
654
+ """
655
+ if not id:
656
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
657
+ return await self._get(
658
+ f"/documents/{id}/download_link",
659
+ options=make_request_options(
660
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
661
+ ),
662
+ cast_to=DocumentGenerateDownloadLinkResponse,
663
+ )
664
+
596
665
  @overload
597
666
  async def upload(
598
667
  self,
@@ -724,6 +793,9 @@ class DocumentsResourceWithRawResponse:
724
793
  documents.download,
725
794
  BinaryAPIResponse,
726
795
  )
796
+ self.generate_download_link = to_raw_response_wrapper(
797
+ documents.generate_download_link,
798
+ )
727
799
  self.upload = to_raw_response_wrapper(
728
800
  documents.upload,
729
801
  )
@@ -749,6 +821,9 @@ class AsyncDocumentsResourceWithRawResponse:
749
821
  documents.download,
750
822
  AsyncBinaryAPIResponse,
751
823
  )
824
+ self.generate_download_link = async_to_raw_response_wrapper(
825
+ documents.generate_download_link,
826
+ )
752
827
  self.upload = async_to_raw_response_wrapper(
753
828
  documents.upload,
754
829
  )
@@ -774,6 +849,9 @@ class DocumentsResourceWithStreamingResponse:
774
849
  documents.download,
775
850
  StreamedBinaryAPIResponse,
776
851
  )
852
+ self.generate_download_link = to_streamed_response_wrapper(
853
+ documents.generate_download_link,
854
+ )
777
855
  self.upload = to_streamed_response_wrapper(
778
856
  documents.upload,
779
857
  )
@@ -799,6 +877,9 @@ class AsyncDocumentsResourceWithStreamingResponse:
799
877
  documents.download,
800
878
  AsyncStreamedBinaryAPIResponse,
801
879
  )
880
+ self.generate_download_link = async_to_streamed_response_wrapper(
881
+ documents.generate_download_link,
882
+ )
802
883
  self.upload = async_to_streamed_response_wrapper(
803
884
  documents.upload,
804
885
  )
telnyx/types/__init__.py CHANGED
@@ -893,6 +893,9 @@ from .call_control_application_delete_response import (
893
893
  from .call_control_application_update_response import (
894
894
  CallControlApplicationUpdateResponse as CallControlApplicationUpdateResponse,
895
895
  )
896
+ from .document_generate_download_link_response import (
897
+ DocumentGenerateDownloadLinkResponse as DocumentGenerateDownloadLinkResponse,
898
+ )
896
899
  from .dynamic_emergency_endpoint_create_params import (
897
900
  DynamicEmergencyEndpointCreateParams as DynamicEmergencyEndpointCreateParams,
898
901
  )
@@ -0,0 +1,14 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .._models import BaseModel
4
+
5
+ __all__ = ["DocumentGenerateDownloadLinkResponse", "Data"]
6
+
7
+
8
+ class Data(BaseModel):
9
+ url: str
10
+ """Pre-signed temporary URL for downloading the document"""
11
+
12
+
13
+ class DocumentGenerateDownloadLinkResponse(BaseModel):
14
+ data: Data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: telnyx
3
- Version: 3.1.0a0
3
+ Version: 3.2.0a0
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
@@ -11,7 +11,7 @@ telnyx/_resource.py,sha256=B4Qg-uO2a34FQHHZskn89eVURqMuSvv1TdeBJH1z1rU,1100
11
11
  telnyx/_response.py,sha256=4X24wr7uQn2hnM_b0xqQ92zSgxRFFfWG2lTg93-KzNo,28788
12
12
  telnyx/_streaming.py,sha256=OfSFcMQJ_mnvfkbIdOG7Ajp0SMbXnOJSga4xXHjNAJk,10100
13
13
  telnyx/_types.py,sha256=c0fPUnqjxrdVYFjtxNbWwRnbHiW4iCbbfw_xnr-BVZw,6197
14
- telnyx/_version.py,sha256=jW6Z7Z0h1E7JA5GclhABpPO-TccZcd-6fIfEUWnKKx4,164
14
+ telnyx/_version.py,sha256=VqlH-efC09RqzXBZP0c_UzMcHKDOHCUJSiRtHZ7_n_Y,164
15
15
  telnyx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  telnyx/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
17
17
  telnyx/_utils/_logs.py,sha256=0TK41m0v92Gj1abmzI7B2Ogm7Mcu_J9hiz8mkrF5cIQ,774
@@ -48,7 +48,7 @@ telnyx/resources/customer_service_records.py,sha256=d4I83zLME3c8Afzw56h22nYLASXd
48
48
  telnyx/resources/detail_records.py,sha256=udmlGeGoP2G70NwH0GsP62cp8RJwRzg6Suvs8begKkY,7857
49
49
  telnyx/resources/dialogflow_connections.py,sha256=NqrxiR17ICouCrNz8ahbenUr7co_-WxJxXnFQmPuJOg,21618
50
50
  telnyx/resources/document_links.py,sha256=5X5y-a5t7-exjlwT0y7VIKwSDuIacgrDECiTK2jLVco,7470
51
- telnyx/resources/documents.py,sha256=M9vCcJ0QFgxrhQM9l-DPyQ3QWegbglcytqdJWW75fbo,31424
51
+ telnyx/resources/documents.py,sha256=_GhcVL53xyoJB0Nchq05xSz7AGMPCsl3bUOVnLdejpE,34912
52
52
  telnyx/resources/dynamic_emergency_addresses.py,sha256=N-RKemA-sdfDGS3abSVr7vRWcG02tZOlC9-cKhg5aSY,20075
53
53
  telnyx/resources/dynamic_emergency_endpoints.py,sha256=GJwFVKp06pV4bVbEHTmpDOPJ_w9L6DntTQdrUvu5br0,18716
54
54
  telnyx/resources/enum.py,sha256=xGHamZ9ftAUwGxmVveOms-5C2jHFRdChDpN23M2vxnw,7191
@@ -335,7 +335,7 @@ telnyx/resources/verified_numbers/verified_numbers.py,sha256=evCpg4XTmWzO8mog7GC
335
335
  telnyx/resources/wireless/__init__.py,sha256=fEZwFm-3jI908Ui2_pT-S-3Titgg1vs7uFjzK4p406M,1212
336
336
  telnyx/resources/wireless/detail_records_reports.py,sha256=73b10ZJJYsNwTdqA5bee4Q3_TG3WTskTkg4mPsM1jOc,17982
337
337
  telnyx/resources/wireless/wireless.py,sha256=NQKcHQh4AoB4VrJRsgP3KGIH64bJmwAXFLRK7ZR1AX8,8176
338
- telnyx/types/__init__.py,sha256=pnGRPpE5WAUot73dGUpY0a5Y6fmaMhJ2vJMe71YbzTU,88687
338
+ telnyx/types/__init__.py,sha256=mcKOwP3UJpculiAGKSSkPh9P3BekW0WLQHCCgiuZW8Q,88827
339
339
  telnyx/types/access_ip_address_create_params.py,sha256=qd_T7W_K4XiVIdsJLbsS5U9Qlf3_m0DT677n5Tqdvm8,329
340
340
  telnyx/types/access_ip_address_list_params.py,sha256=3sWF6U18lHT3y0fGouO8qCznMlvEyW5PRGx_pItEeLo,1870
341
341
  telnyx/types/access_ip_address_list_response.py,sha256=WFYBcqjSoC6c4rf9V6zGWkcB0_UG9DnMQwF5ic17MdY,475
@@ -502,6 +502,7 @@ telnyx/types/dialogflow_connection_update_params.py,sha256=sYD7qggWOuuEc8ajJJbaO
502
502
  telnyx/types/dialogflow_connection_update_response.py,sha256=iH8x461sDBP4GTzwdVoOHG2iYqedYLCKD0sVkHqO1iI,834
503
503
  telnyx/types/doc_service_document.py,sha256=7SX92batc6UbJ2oUt8xRP7Ru3F2Jfg0MS9AxRFXarF4,1387
504
504
  telnyx/types/document_delete_response.py,sha256=kKs1qRGn8G_X5i-i8ktv1zZkWk44BSFm9gOJTO5uAlw,328
505
+ telnyx/types/document_generate_download_link_response.py,sha256=tAX-ZsAO8p5Xgs7Pq3rRYQ_bdTbYCyb0U7MB1w6TjOM,353
505
506
  telnyx/types/document_link_list_params.py,sha256=HyoeYzCPaJAOaygTEflL6wJWg1Ux2Icn_QUDAalsHkM,928
506
507
  telnyx/types/document_link_list_response.py,sha256=cEV3Bx6g2_uxpU1469ODamMLoYpErA4U5KCj_lt7qoQ,1049
507
508
  telnyx/types/document_list_params.py,sha256=4enb4EGHLCcy8Y4VUwYs4Fvq2o9GYmXbQeRHw0KPjkA,2066
@@ -1869,7 +1870,7 @@ telnyx/types/wireless/detail_records_report_list_params.py,sha256=cfjsh4L_8mpDkg
1869
1870
  telnyx/types/wireless/detail_records_report_list_response.py,sha256=S_6nD0fm5EseRIZHnML-UN0-g8Q_0J1cXfg_eLNUev8,331
1870
1871
  telnyx/types/wireless/detail_records_report_retrieve_response.py,sha256=f0C8z8uo_QeCyi3nSDME4f4F3vqcy7o0MpinwDIqe_s,327
1871
1872
  telnyx/types/wireless/wdr_report.py,sha256=bxRr-dc_IW6D0E3i_PUHK-bbu9w114Qql1uoJ_znxEE,1068
1872
- telnyx-3.1.0a0.dist-info/METADATA,sha256=p5aWr5CWpT9Zjbyfth1FHwGuixKHcCb_udB7Kn42KEA,14160
1873
- telnyx-3.1.0a0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
1874
- telnyx-3.1.0a0.dist-info/licenses/LICENSE,sha256=PprdXvskBJR41_t2uhgs5rHYGME_Ek-lh2PAxKtdZs8,1046
1875
- telnyx-3.1.0a0.dist-info/RECORD,,
1873
+ telnyx-3.2.0a0.dist-info/METADATA,sha256=UKjv1-_Len5oDlGa_esu4rlB1nha5F8z4JmK1nspYGE,14160
1874
+ telnyx-3.2.0a0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
1875
+ telnyx-3.2.0a0.dist-info/licenses/LICENSE,sha256=PprdXvskBJR41_t2uhgs5rHYGME_Ek-lh2PAxKtdZs8,1046
1876
+ telnyx-3.2.0a0.dist-info/RECORD,,