mirror of
https://github.com/cloudflare/cloudflare-python.git
synced 2026-01-16 23:01:03 +00:00
feat: OpenAPI spec update via Stainless API (#124)
This commit is contained in:
parent
70c9fdaf8b
commit
d96fe7f367
3 changed files with 44 additions and 0 deletions
|
|
@ -55,12 +55,15 @@ class URLScanner(SyncAPIResource):
|
|||
account_id: str,
|
||||
*,
|
||||
account_scans: bool | NotGiven = NOT_GIVEN,
|
||||
asn: str | NotGiven = NOT_GIVEN,
|
||||
date_end: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
||||
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
||||
hostname: str | NotGiven = NOT_GIVEN,
|
||||
ip: str | NotGiven = NOT_GIVEN,
|
||||
is_malicious: bool | NotGiven = NOT_GIVEN,
|
||||
limit: int | NotGiven = NOT_GIVEN,
|
||||
next_cursor: str | NotGiven = NOT_GIVEN,
|
||||
page_asn: str | NotGiven = NOT_GIVEN,
|
||||
page_hostname: str | NotGiven = NOT_GIVEN,
|
||||
page_ip: str | NotGiven = NOT_GIVEN,
|
||||
page_path: str | NotGiven = NOT_GIVEN,
|
||||
|
|
@ -88,6 +91,9 @@ class URLScanner(SyncAPIResource):
|
|||
|
||||
account_scans: Return only scans created by account.
|
||||
|
||||
asn: Filter scans by Autonomous System Number (ASN) of _any_ request made by the
|
||||
webpage.
|
||||
|
||||
date_end: Filter scans requested before date (inclusive).
|
||||
|
||||
date_start: Filter scans requested after date (inclusive).
|
||||
|
|
@ -96,10 +102,14 @@ class URLScanner(SyncAPIResource):
|
|||
|
||||
ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
|
||||
|
||||
is_malicious: Filter scans by malicious verdict.
|
||||
|
||||
limit: Limit the number of objects in the response.
|
||||
|
||||
next_cursor: Pagination cursor to get the next set of results.
|
||||
|
||||
page_asn: Filter scans by main page Autonomous System Number (ASN).
|
||||
|
||||
page_hostname: Filter scans by main page hostname .
|
||||
|
||||
page_ip: Filter scans by main page IP address (IPv4 or IPv6).
|
||||
|
|
@ -134,12 +144,15 @@ class URLScanner(SyncAPIResource):
|
|||
query=maybe_transform(
|
||||
{
|
||||
"account_scans": account_scans,
|
||||
"asn": asn,
|
||||
"date_end": date_end,
|
||||
"date_start": date_start,
|
||||
"hostname": hostname,
|
||||
"ip": ip,
|
||||
"is_malicious": is_malicious,
|
||||
"limit": limit,
|
||||
"next_cursor": next_cursor,
|
||||
"page_asn": page_asn,
|
||||
"page_hostname": page_hostname,
|
||||
"page_ip": page_ip,
|
||||
"page_path": page_path,
|
||||
|
|
@ -174,12 +187,15 @@ class AsyncURLScanner(AsyncAPIResource):
|
|||
account_id: str,
|
||||
*,
|
||||
account_scans: bool | NotGiven = NOT_GIVEN,
|
||||
asn: str | NotGiven = NOT_GIVEN,
|
||||
date_end: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
||||
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
||||
hostname: str | NotGiven = NOT_GIVEN,
|
||||
ip: str | NotGiven = NOT_GIVEN,
|
||||
is_malicious: bool | NotGiven = NOT_GIVEN,
|
||||
limit: int | NotGiven = NOT_GIVEN,
|
||||
next_cursor: str | NotGiven = NOT_GIVEN,
|
||||
page_asn: str | NotGiven = NOT_GIVEN,
|
||||
page_hostname: str | NotGiven = NOT_GIVEN,
|
||||
page_ip: str | NotGiven = NOT_GIVEN,
|
||||
page_path: str | NotGiven = NOT_GIVEN,
|
||||
|
|
@ -207,6 +223,9 @@ class AsyncURLScanner(AsyncAPIResource):
|
|||
|
||||
account_scans: Return only scans created by account.
|
||||
|
||||
asn: Filter scans by Autonomous System Number (ASN) of _any_ request made by the
|
||||
webpage.
|
||||
|
||||
date_end: Filter scans requested before date (inclusive).
|
||||
|
||||
date_start: Filter scans requested after date (inclusive).
|
||||
|
|
@ -215,10 +234,14 @@ class AsyncURLScanner(AsyncAPIResource):
|
|||
|
||||
ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
|
||||
|
||||
is_malicious: Filter scans by malicious verdict.
|
||||
|
||||
limit: Limit the number of objects in the response.
|
||||
|
||||
next_cursor: Pagination cursor to get the next set of results.
|
||||
|
||||
page_asn: Filter scans by main page Autonomous System Number (ASN).
|
||||
|
||||
page_hostname: Filter scans by main page hostname .
|
||||
|
||||
page_ip: Filter scans by main page IP address (IPv4 or IPv6).
|
||||
|
|
@ -253,12 +276,15 @@ class AsyncURLScanner(AsyncAPIResource):
|
|||
query=await async_maybe_transform(
|
||||
{
|
||||
"account_scans": account_scans,
|
||||
"asn": asn,
|
||||
"date_end": date_end,
|
||||
"date_start": date_start,
|
||||
"hostname": hostname,
|
||||
"ip": ip,
|
||||
"is_malicious": is_malicious,
|
||||
"limit": limit,
|
||||
"next_cursor": next_cursor,
|
||||
"page_asn": page_asn,
|
||||
"page_hostname": page_hostname,
|
||||
"page_ip": page_ip,
|
||||
"page_path": page_path,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,12 @@ class URLScannerScanParams(TypedDict, total=False):
|
|||
account_scans: bool
|
||||
"""Return only scans created by account."""
|
||||
|
||||
asn: str
|
||||
"""
|
||||
Filter scans by Autonomous System Number (ASN) of _any_ request made by the
|
||||
webpage.
|
||||
"""
|
||||
|
||||
date_end: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
|
||||
"""Filter scans requested before date (inclusive)."""
|
||||
|
||||
|
|
@ -27,12 +33,18 @@ class URLScannerScanParams(TypedDict, total=False):
|
|||
ip: str
|
||||
"""Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage."""
|
||||
|
||||
is_malicious: bool
|
||||
"""Filter scans by malicious verdict."""
|
||||
|
||||
limit: int
|
||||
"""Limit the number of objects in the response."""
|
||||
|
||||
next_cursor: str
|
||||
"""Pagination cursor to get the next set of results."""
|
||||
|
||||
page_asn: str
|
||||
"""Filter scans by main page Autonomous System Number (ASN)."""
|
||||
|
||||
page_hostname: str
|
||||
"""Filter scans by main page hostname ."""
|
||||
|
||||
|
|
|
|||
|
|
@ -32,12 +32,15 @@ class TestURLScanner:
|
|||
url_scanner = client.url_scanner.scan(
|
||||
"string",
|
||||
account_scans=True,
|
||||
asn="13335",
|
||||
date_end=parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
date_start=parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
hostname="example.com",
|
||||
ip="1.1.1.1",
|
||||
is_malicious=True,
|
||||
limit=100,
|
||||
next_cursor="string",
|
||||
page_asn="string",
|
||||
page_hostname="string",
|
||||
page_ip="string",
|
||||
page_path="string",
|
||||
|
|
@ -100,12 +103,15 @@ class TestAsyncURLScanner:
|
|||
url_scanner = await async_client.url_scanner.scan(
|
||||
"string",
|
||||
account_scans=True,
|
||||
asn="13335",
|
||||
date_end=parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
date_start=parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
hostname="example.com",
|
||||
ip="1.1.1.1",
|
||||
is_malicious=True,
|
||||
limit=100,
|
||||
next_cursor="string",
|
||||
page_asn="string",
|
||||
page_hostname="string",
|
||||
page_ip="string",
|
||||
page_path="string",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue