22
33from __future__ import annotations
44
5+ from typing import Optional
6+
57import httpx
68
79from ..._types import NOT_GIVEN , Body , Query , Headers , NotGiven
1719from ...pagination import SyncV4PagePagination , AsyncV4PagePagination
1820from ...types .intel import dns_list_params
1921from ..._base_client import AsyncPaginator , make_request_options
20- from ...types .intel .dns_list_response import DNSListResponse
22+ from ...types .intel .dns import DNS
2123
2224__all__ = ["DNSResource" , "AsyncDNSResource" ]
2325
@@ -56,7 +58,7 @@ def list(
5658 extra_query : Query | None = None ,
5759 extra_body : Body | None = None ,
5860 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
59- ) -> SyncV4PagePagination [DNSListResponse ]:
61+ ) -> SyncV4PagePagination [Optional [ DNS ] ]:
6062 """
6163 Gets a list of all the domains that have resolved to a specific IP address.
6264
@@ -79,7 +81,7 @@ def list(
7981 raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
8082 return self ._get_api_list (
8183 f"/accounts/{ account_id } /intel/dns" ,
82- page = SyncV4PagePagination [DNSListResponse ],
84+ page = SyncV4PagePagination [Optional [ DNS ] ],
8385 options = make_request_options (
8486 extra_headers = extra_headers ,
8587 extra_query = extra_query ,
@@ -95,7 +97,7 @@ def list(
9597 dns_list_params .DNSListParams ,
9698 ),
9799 ),
98- model = DNSListResponse ,
100+ model = DNS ,
99101 )
100102
101103
@@ -133,7 +135,7 @@ def list(
133135 extra_query : Query | None = None ,
134136 extra_body : Body | None = None ,
135137 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
136- ) -> AsyncPaginator [DNSListResponse , AsyncV4PagePagination [DNSListResponse ]]:
138+ ) -> AsyncPaginator [Optional [ DNS ] , AsyncV4PagePagination [Optional [ DNS ] ]]:
137139 """
138140 Gets a list of all the domains that have resolved to a specific IP address.
139141
@@ -156,7 +158,7 @@ def list(
156158 raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
157159 return self ._get_api_list (
158160 f"/accounts/{ account_id } /intel/dns" ,
159- page = AsyncV4PagePagination [DNSListResponse ],
161+ page = AsyncV4PagePagination [Optional [ DNS ] ],
160162 options = make_request_options (
161163 extra_headers = extra_headers ,
162164 extra_query = extra_query ,
@@ -172,7 +174,7 @@ def list(
172174 dns_list_params .DNSListParams ,
173175 ),
174176 ),
175- model = DNSListResponse ,
177+ model = DNS ,
176178 )
177179
178180
0 commit comments