From 2e4eb74eab97ecb6366790bcfe2305a3025cd43a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 22:58:54 +0000 Subject: [PATCH] feat(api): update via SDK Studio (#250) --- api.md | 6 +---- src/cloudflare/types/intel/__init__.py | 3 --- src/cloudflare/types/intel/dns.py | 17 +++++++++++--- src/cloudflare/types/intel/dns_param.py | 22 ++++++++++++++----- ...ma_ref_b5e16cee4f32382c294201aedb9fc050.py | 19 ---------------- 5 files changed, 32 insertions(+), 35 deletions(-) delete mode 100644 src/cloudflare/types/intel/unnamed_schema_ref_b5e16cee4f32382c294201aedb9fc050.py diff --git a/api.md b/api.md index 3c42613e5e4d..40717fff0e44 100644 --- a/api.md +++ b/api.md @@ -3472,11 +3472,7 @@ Methods: Types: ```python -from cloudflare.types.intel import ( - DNS, - UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050, - DNSListResponse, -) +from cloudflare.types.intel import DNS, DNSListResponse ``` Methods: diff --git a/src/cloudflare/types/intel/__init__.py b/src/cloudflare/types/intel/__init__.py index dec9c730145b..0c5ee90a96af 100644 --- a/src/cloudflare/types/intel/__init__.py +++ b/src/cloudflare/types/intel/__init__.py @@ -29,6 +29,3 @@ from .indicator_feed_update_response import IndicatorFeedUpdateResponse as IndicatorFeedUpdateResponse from .miscategorization_create_params import MiscategorizationCreateParams as MiscategorizationCreateParams from .miscategorization_create_response import MiscategorizationCreateResponse as MiscategorizationCreateResponse -from .unnamed_schema_ref_b5e16cee4f32382c294201aedb9fc050 import ( - UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050 as UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050, -) diff --git a/src/cloudflare/types/intel/dns.py b/src/cloudflare/types/intel/dns.py index ee5e780fe497..66f00d109dd3 100644 --- a/src/cloudflare/types/intel/dns.py +++ b/src/cloudflare/types/intel/dns.py @@ -1,11 +1,22 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional +from datetime import date from ..._models import BaseModel -from .unnamed_schema_ref_b5e16cee4f32382c294201aedb9fc050 import UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050 -__all__ = ["DNS"] +__all__ = ["DNS", "ReverseRecord"] + + +class ReverseRecord(BaseModel): + first_seen: Optional[date] = None + """First seen date of the DNS record during the time period.""" + + hostname: Optional[object] = None + """Hostname that the IP was observed resolving to.""" + + last_seen: Optional[date] = None + """Last seen date of the DNS record during the time period.""" class DNS(BaseModel): @@ -18,5 +29,5 @@ class DNS(BaseModel): per_page: Optional[float] = None """Number of results per page of results.""" - reverse_records: Optional[List[UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050]] = None + reverse_records: Optional[List[ReverseRecord]] = None """Reverse DNS look-ups observed during the time period.""" diff --git a/src/cloudflare/types/intel/dns_param.py b/src/cloudflare/types/intel/dns_param.py index d7b876e03c33..dcca6358a0bf 100644 --- a/src/cloudflare/types/intel/dns_param.py +++ b/src/cloudflare/types/intel/dns_param.py @@ -2,12 +2,24 @@ from __future__ import annotations -from typing import Iterable -from typing_extensions import TypedDict +from typing import Union, Iterable +from datetime import date +from typing_extensions import Annotated, TypedDict -from .unnamed_schema_ref_b5e16cee4f32382c294201aedb9fc050 import UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050 +from ..._utils import PropertyInfo -__all__ = ["DNSParam"] +__all__ = ["DNSParam", "ReverseRecord"] + + +class ReverseRecord(TypedDict, total=False): + first_seen: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """First seen date of the DNS record during the time period.""" + + hostname: object + """Hostname that the IP was observed resolving to.""" + + last_seen: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Last seen date of the DNS record during the time period.""" class DNSParam(TypedDict, total=False): @@ -20,5 +32,5 @@ class DNSParam(TypedDict, total=False): per_page: float """Number of results per page of results.""" - reverse_records: Iterable[UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050] + reverse_records: Iterable[ReverseRecord] """Reverse DNS look-ups observed during the time period.""" diff --git a/src/cloudflare/types/intel/unnamed_schema_ref_b5e16cee4f32382c294201aedb9fc050.py b/src/cloudflare/types/intel/unnamed_schema_ref_b5e16cee4f32382c294201aedb9fc050.py deleted file mode 100644 index 8e95411d68d2..000000000000 --- a/src/cloudflare/types/intel/unnamed_schema_ref_b5e16cee4f32382c294201aedb9fc050.py +++ /dev/null @@ -1,19 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from datetime import date - -from ..._models import BaseModel - -__all__ = ["UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050"] - - -class UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050(BaseModel): - first_seen: Optional[date] = None - """First seen date of the DNS record during the time period.""" - - hostname: Optional[object] = None - """Hostname that the IP was observed resolving to.""" - - last_seen: Optional[date] = None - """Last seen date of the DNS record during the time period."""