Skip to content

Commit dcdd626

Browse files
feat(api): OpenAPI spec update via Stainless API (#137)
1 parent 37febeb commit dcdd626

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/cloudflare/resources/url_scanner/url_scanner.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def scan(
5858
asn: str | NotGiven = NOT_GIVEN,
5959
date_end: Union[str, datetime] | NotGiven = NOT_GIVEN,
6060
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
61+
hash: str | NotGiven = NOT_GIVEN,
6162
hostname: str | NotGiven = NOT_GIVEN,
6263
ip: str | NotGiven = NOT_GIVEN,
6364
is_malicious: bool | NotGiven = NOT_GIVEN,
@@ -98,6 +99,8 @@ def scan(
9899
99100
date_start: Filter scans requested after date (inclusive).
100101
102+
hash: Filter scans by hash of any html/js/css request made by the webpage.
103+
101104
hostname: Filter scans by hostname of _any_ request made by the webpage.
102105
103106
ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
@@ -147,6 +150,7 @@ def scan(
147150
"asn": asn,
148151
"date_end": date_end,
149152
"date_start": date_start,
153+
"hash": hash,
150154
"hostname": hostname,
151155
"ip": ip,
152156
"is_malicious": is_malicious,
@@ -190,6 +194,7 @@ async def scan(
190194
asn: str | NotGiven = NOT_GIVEN,
191195
date_end: Union[str, datetime] | NotGiven = NOT_GIVEN,
192196
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
197+
hash: str | NotGiven = NOT_GIVEN,
193198
hostname: str | NotGiven = NOT_GIVEN,
194199
ip: str | NotGiven = NOT_GIVEN,
195200
is_malicious: bool | NotGiven = NOT_GIVEN,
@@ -230,6 +235,8 @@ async def scan(
230235
231236
date_start: Filter scans requested after date (inclusive).
232237
238+
hash: Filter scans by hash of any html/js/css request made by the webpage.
239+
233240
hostname: Filter scans by hostname of _any_ request made by the webpage.
234241
235242
ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
@@ -279,6 +286,7 @@ async def scan(
279286
"asn": asn,
280287
"date_end": date_end,
281288
"date_start": date_start,
289+
"hash": hash,
282290
"hostname": hostname,
283291
"ip": ip,
284292
"is_malicious": is_malicious,

src/cloudflare/types/url_scanner_scan_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ class URLScannerScanParams(TypedDict, total=False):
2727
date_start: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
2828
"""Filter scans requested after date (inclusive)."""
2929

30+
hash: str
31+
"""Filter scans by hash of any html/js/css request made by the webpage."""
32+
3033
hostname: str
3134
"""Filter scans by hostname of _any_ request made by the webpage."""
3235

tests/api_resources/test_url_scanner.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def test_method_scan_with_all_params(self, client: Cloudflare) -> None:
3535
asn="13335",
3636
date_end=parse_datetime("2019-12-27T18:11:19.117Z"),
3737
date_start=parse_datetime("2019-12-27T18:11:19.117Z"),
38+
hash="string",
3839
hostname="example.com",
3940
ip="1.1.1.1",
4041
is_malicious=True,
@@ -106,6 +107,7 @@ async def test_method_scan_with_all_params(self, async_client: AsyncCloudflare)
106107
asn="13335",
107108
date_end=parse_datetime("2019-12-27T18:11:19.117Z"),
108109
date_start=parse_datetime("2019-12-27T18:11:19.117Z"),
110+
hash="string",
109111
hostname="example.com",
110112
ip="1.1.1.1",
111113
is_malicious=True,

0 commit comments

Comments
 (0)