33from __future__ import annotations
44
55from typing import Type , Iterable , Optional , cast
6+ from typing_extensions import Literal
67
78import httpx
89
1718 async_to_streamed_response_wrapper ,
1819)
1920from ...._wrappers import ResultWrapper
20- from ....pagination import SyncSinglePage , AsyncSinglePage
21+ from ....pagination import SyncV4PagePaginationArray , AsyncV4PagePaginationArray
2122from ...._base_client import AsyncPaginator , make_request_options
22- from ....types .zero_trust .devices import dex_test_create_params , dex_test_update_params
23+ from ....types .zero_trust .devices import dex_test_list_params , dex_test_create_params , dex_test_update_params
2324from ....types .zero_trust .devices .dex_test_get_response import DEXTestGetResponse
2425from ....types .zero_trust .devices .dex_test_list_response import DEXTestListResponse
2526from ....types .zero_trust .devices .dex_test_create_response import DEXTestCreateResponse
@@ -196,17 +197,29 @@ def list(
196197 self ,
197198 * ,
198199 account_id : str ,
200+ kind : Literal ["http" , "traceroute" ] | Omit = omit ,
201+ page : float | Omit = omit ,
202+ per_page : float | Omit = omit ,
203+ test_name : str | Omit = omit ,
199204 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
200205 # The extra values given here take precedence over values defined on the client or passed to this method.
201206 extra_headers : Headers | None = None ,
202207 extra_query : Query | None = None ,
203208 extra_body : Body | None = None ,
204209 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
205- ) -> SyncSinglePage [DEXTestListResponse ]:
210+ ) -> SyncV4PagePaginationArray [DEXTestListResponse ]:
206211 """
207212 Fetch all DEX tests
208213
209214 Args:
215+ kind: Filter by test type
216+
217+ page: Page number of paginated results
218+
219+ per_page: Number of items per page
220+
221+ test_name: Filter by test name
222+
210223 extra_headers: Send extra headers
211224
212225 extra_query: Add additional query parameters to the request
@@ -219,9 +232,21 @@ def list(
219232 raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
220233 return self ._get_api_list (
221234 f"/accounts/{ account_id } /dex/devices/dex_tests" ,
222- page = SyncSinglePage [DEXTestListResponse ],
235+ page = SyncV4PagePaginationArray [DEXTestListResponse ],
223236 options = make_request_options (
224- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
237+ extra_headers = extra_headers ,
238+ extra_query = extra_query ,
239+ extra_body = extra_body ,
240+ timeout = timeout ,
241+ query = maybe_transform (
242+ {
243+ "kind" : kind ,
244+ "page" : page ,
245+ "per_page" : per_page ,
246+ "test_name" : test_name ,
247+ },
248+ dex_test_list_params .DEXTestListParams ,
249+ ),
225250 ),
226251 model = DEXTestListResponse ,
227252 )
@@ -480,17 +505,29 @@ def list(
480505 self ,
481506 * ,
482507 account_id : str ,
508+ kind : Literal ["http" , "traceroute" ] | Omit = omit ,
509+ page : float | Omit = omit ,
510+ per_page : float | Omit = omit ,
511+ test_name : str | Omit = omit ,
483512 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
484513 # The extra values given here take precedence over values defined on the client or passed to this method.
485514 extra_headers : Headers | None = None ,
486515 extra_query : Query | None = None ,
487516 extra_body : Body | None = None ,
488517 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
489- ) -> AsyncPaginator [DEXTestListResponse , AsyncSinglePage [DEXTestListResponse ]]:
518+ ) -> AsyncPaginator [DEXTestListResponse , AsyncV4PagePaginationArray [DEXTestListResponse ]]:
490519 """
491520 Fetch all DEX tests
492521
493522 Args:
523+ kind: Filter by test type
524+
525+ page: Page number of paginated results
526+
527+ per_page: Number of items per page
528+
529+ test_name: Filter by test name
530+
494531 extra_headers: Send extra headers
495532
496533 extra_query: Add additional query parameters to the request
@@ -503,9 +540,21 @@ def list(
503540 raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
504541 return self ._get_api_list (
505542 f"/accounts/{ account_id } /dex/devices/dex_tests" ,
506- page = AsyncSinglePage [DEXTestListResponse ],
543+ page = AsyncV4PagePaginationArray [DEXTestListResponse ],
507544 options = make_request_options (
508- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
545+ extra_headers = extra_headers ,
546+ extra_query = extra_query ,
547+ extra_body = extra_body ,
548+ timeout = timeout ,
549+ query = maybe_transform (
550+ {
551+ "kind" : kind ,
552+ "page" : page ,
553+ "per_page" : per_page ,
554+ "test_name" : test_name ,
555+ },
556+ dex_test_list_params .DEXTestListParams ,
557+ ),
509558 ),
510559 model = DEXTestListResponse ,
511560 )
0 commit comments