Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Mar 18, 2024
1 parent 37febeb commit 30ecf48
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cloudflare/resources/url_scanner/url_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def scan(
asn: str | NotGiven = NOT_GIVEN,
date_end: Union[str, datetime] | NotGiven = NOT_GIVEN,
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
hash: str | NotGiven = NOT_GIVEN,
hostname: str | NotGiven = NOT_GIVEN,
ip: str | NotGiven = NOT_GIVEN,
is_malicious: bool | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -98,6 +99,8 @@ def scan(
date_start: Filter scans requested after date (inclusive).
hash: Filter scans by hash of any html/js/css request made by the webpage.
hostname: Filter scans by hostname of _any_ request made by the webpage.
ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
Expand Down Expand Up @@ -147,6 +150,7 @@ def scan(
"asn": asn,
"date_end": date_end,
"date_start": date_start,
"hash": hash,
"hostname": hostname,
"ip": ip,
"is_malicious": is_malicious,
Expand Down Expand Up @@ -190,6 +194,7 @@ async def scan(
asn: str | NotGiven = NOT_GIVEN,
date_end: Union[str, datetime] | NotGiven = NOT_GIVEN,
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
hash: str | NotGiven = NOT_GIVEN,
hostname: str | NotGiven = NOT_GIVEN,
ip: str | NotGiven = NOT_GIVEN,
is_malicious: bool | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -230,6 +235,8 @@ async def scan(
date_start: Filter scans requested after date (inclusive).
hash: Filter scans by hash of any html/js/css request made by the webpage.
hostname: Filter scans by hostname of _any_ request made by the webpage.
ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
Expand Down Expand Up @@ -279,6 +286,7 @@ async def scan(
"asn": asn,
"date_end": date_end,
"date_start": date_start,
"hash": hash,
"hostname": hostname,
"ip": ip,
"is_malicious": is_malicious,
Expand Down
3 changes: 3 additions & 0 deletions src/cloudflare/types/url_scanner_scan_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class URLScannerScanParams(TypedDict, total=False):
date_start: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""Filter scans requested after date (inclusive)."""

hash: str
"""Filter scans by hash of any html/js/css request made by the webpage."""

hostname: str
"""Filter scans by hostname of _any_ request made by the webpage."""

Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_url_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def test_method_scan_with_all_params(self, client: Cloudflare) -> None:
asn="13335",
date_end=parse_datetime("2019-12-27T18:11:19.117Z"),
date_start=parse_datetime("2019-12-27T18:11:19.117Z"),
hash="string",
hostname="example.com",
ip="1.1.1.1",
is_malicious=True,
Expand Down Expand Up @@ -106,6 +107,7 @@ async def test_method_scan_with_all_params(self, async_client: AsyncCloudflare)
asn="13335",
date_end=parse_datetime("2019-12-27T18:11:19.117Z"),
date_start=parse_datetime("2019-12-27T18:11:19.117Z"),
hash="string",
hostname="example.com",
ip="1.1.1.1",
is_malicious=True,
Expand Down

0 comments on commit 30ecf48

Please sign in to comment.