Skip to content

Commit f4a0a19

Browse files
chore(api): update composite API spec
1 parent 0369387 commit f4a0a19

4 files changed

Lines changed: 78 additions & 3 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2095
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d600c04f084970b390bba13bed288ed627df81645252979be2b342fc374adc60.yml
3-
openapi_spec_hash: 698115c9b89f7ee7ea1cbf7aeee8f77e
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1a7ea9c9fe881d6a987b12b56aebd558dcc15b0abc5a3426f377b4cea3a561a2.yml
3+
openapi_spec_hash: 95a46dba13322f0ad9d35968ad45ea6b
44
config_hash: 3197a7cbacf324269e77cfb812a38f53

src/cloudflare/resources/abuse_reports/abuse_reports.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,7 @@ def create(
631631
urls: str,
632632
comments: str | Omit = omit,
633633
company: str | Omit = omit,
634+
reg_who_request: abuse_report_create_params.AbuseReportsRegistrarWhoisReportRegWhoRequest | Omit = omit,
634635
reported_country: str | Omit = omit,
635636
reported_user_agent: str | Omit = omit,
636637
tele: str | Omit = omit,
@@ -671,6 +672,8 @@ def create(
671672
company: Text not exceeding 100 characters. This field may be released by Cloudflare to
672673
third parties such as the Lumen Database (https://lumendatabase.org/).
673674
675+
reg_who_request: ICANN-mandated fields for registrar WHOIS data disclosure requests.
676+
674677
reported_country: Text containing 2 characters
675678
676679
reported_user_agent: Text not exceeding 255 characters
@@ -884,6 +887,7 @@ def create(
884887
ports_protocols: str | Omit = omit,
885888
source_ips: str | Omit = omit,
886889
ncmec_notification: Literal["send", "send-anon"] | Omit = omit,
890+
reg_who_request: abuse_report_create_params.AbuseReportsRegistrarWhoisReportRegWhoRequest | Omit = omit,
887891
ncsei_subject_representation: bool | Omit = omit,
888892
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
889893
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -929,6 +933,7 @@ def create(
929933
"ports_protocols": ports_protocols,
930934
"source_ips": source_ips,
931935
"ncmec_notification": ncmec_notification,
936+
"reg_who_request": reg_who_request,
932937
"ncsei_subject_representation": ncsei_subject_representation,
933938
},
934939
abuse_report_create_params.AbuseReportCreateParams,
@@ -1657,6 +1662,7 @@ async def create(
16571662
urls: str,
16581663
comments: str | Omit = omit,
16591664
company: str | Omit = omit,
1665+
reg_who_request: abuse_report_create_params.AbuseReportsRegistrarWhoisReportRegWhoRequest | Omit = omit,
16601666
reported_country: str | Omit = omit,
16611667
reported_user_agent: str | Omit = omit,
16621668
tele: str | Omit = omit,
@@ -1697,6 +1703,8 @@ async def create(
16971703
company: Text not exceeding 100 characters. This field may be released by Cloudflare to
16981704
third parties such as the Lumen Database (https://lumendatabase.org/).
16991705
1706+
reg_who_request: ICANN-mandated fields for registrar WHOIS data disclosure requests.
1707+
17001708
reported_country: Text containing 2 characters
17011709
17021710
reported_user_agent: Text not exceeding 255 characters
@@ -1910,6 +1918,7 @@ async def create(
19101918
ports_protocols: str | Omit = omit,
19111919
source_ips: str | Omit = omit,
19121920
ncmec_notification: Literal["send", "send-anon"] | Omit = omit,
1921+
reg_who_request: abuse_report_create_params.AbuseReportsRegistrarWhoisReportRegWhoRequest | Omit = omit,
19131922
ncsei_subject_representation: bool | Omit = omit,
19141923
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
19151924
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1955,6 +1964,7 @@ async def create(
19551964
"ports_protocols": ports_protocols,
19561965
"source_ips": source_ips,
19571966
"ncmec_notification": ncmec_notification,
1967+
"reg_who_request": reg_who_request,
19581968
"ncsei_subject_representation": ncsei_subject_representation,
19591969
},
19601970
abuse_report_create_params.AbuseReportCreateParams,

src/cloudflare/types/abuse_reports/abuse_report_create_params.py

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Union
5+
from typing import List, Union
66
from typing_extensions import Literal, Required, TypeAlias, TypedDict
77

88
__all__ = [
@@ -14,6 +14,7 @@
1414
"AbuseReportsCsamReport",
1515
"AbuseReportsThreatReport",
1616
"AbuseReportsRegistrarWhoisReport",
17+
"AbuseReportsRegistrarWhoisReportRegWhoRequest",
1718
"AbuseReportsNcseiReport",
1819
]
1920

@@ -623,6 +624,9 @@ class AbuseReportsRegistrarWhoisReport(TypedDict, total=False):
623624
Database (https://lumendatabase.org/).
624625
"""
625626

627+
reg_who_request: AbuseReportsRegistrarWhoisReportRegWhoRequest
628+
"""ICANN-mandated fields for registrar WHOIS data disclosure requests."""
629+
626630
reported_country: str
627631
"""Text containing 2 characters"""
628632

@@ -640,6 +644,49 @@ class AbuseReportsRegistrarWhoisReport(TypedDict, total=False):
640644
"""Text not exceeding 255 characters"""
641645

642646

647+
class AbuseReportsRegistrarWhoisReportRegWhoRequest(TypedDict, total=False):
648+
"""ICANN-mandated fields for registrar WHOIS data disclosure requests."""
649+
650+
reg_who_authorization_statement: str
651+
"""Optional authorization statement or power of attorney per ICANN 10.2.1.3."""
652+
653+
reg_who_good_faith_affirmation: bool
654+
"""Affirmation that the request is made in good faith per ICANN 10.2.4."""
655+
656+
reg_who_lawful_processing_agreement: bool
657+
"""Agreement to process data lawfully per ICANN 10.2.5."""
658+
659+
reg_who_legal_basis: str
660+
"""Legal rights and rationale for the request per ICANN 10.2.3."""
661+
662+
reg_who_request_type: Literal["disclosure", "invalid_whois"]
663+
"""The type of WHOIS data request per ICANN procedure."""
664+
665+
reg_who_requested_data_elements: List[
666+
Literal[
667+
"registrant_name",
668+
"registrant_organization",
669+
"registrant_email",
670+
"registrant_phone",
671+
"registrant_address",
672+
"admin_name",
673+
"admin_organization",
674+
"admin_email",
675+
"admin_phone",
676+
"admin_address",
677+
"tech_name",
678+
"tech_organization",
679+
"tech_email",
680+
"tech_phone",
681+
"tech_address",
682+
]
683+
]
684+
"""The specific WHOIS data elements being requested per ICANN 10.2.2."""
685+
686+
reg_who_requestor_type: Literal["government", "corporation", "individual"]
687+
"""The nature of the requestor per ICANN 10.2.1.2."""
688+
689+
643690
class AbuseReportsNcseiReport(TypedDict, total=False):
644691
account_id: Required[str]
645692

tests/api_resources/test_abuse_reports.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,15 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N
811811
urls="urls",
812812
comments="x",
813813
company="x",
814+
reg_who_request={
815+
"reg_who_authorization_statement": "reg_who_authorization_statement",
816+
"reg_who_good_faith_affirmation": True,
817+
"reg_who_lawful_processing_agreement": True,
818+
"reg_who_legal_basis": "reg_who_legal_basis",
819+
"reg_who_request_type": "disclosure",
820+
"reg_who_requested_data_elements": ["registrant_name"],
821+
"reg_who_requestor_type": "government",
822+
},
814823
reported_country="xx",
815824
reported_user_agent="x",
816825
tele="x",
@@ -1910,6 +1919,15 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn
19101919
urls="urls",
19111920
comments="x",
19121921
company="x",
1922+
reg_who_request={
1923+
"reg_who_authorization_statement": "reg_who_authorization_statement",
1924+
"reg_who_good_faith_affirmation": True,
1925+
"reg_who_lawful_processing_agreement": True,
1926+
"reg_who_legal_basis": "reg_who_legal_basis",
1927+
"reg_who_request_type": "disclosure",
1928+
"reg_who_requested_data_elements": ["registrant_name"],
1929+
"reg_who_requestor_type": "government",
1930+
},
19131931
reported_country="xx",
19141932
reported_user_agent="x",
19151933
tele="x",

0 commit comments

Comments
 (0)