Skip to content

Commit f96551d

Browse files
feat(api): api update
1 parent 6249040 commit f96551d

15 files changed

Lines changed: 310 additions & 158 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1752
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-85dad60f1b2821be03c3c8a58b223fceae36de496cee13a358f7603d685d31c0.yml
3-
openapi_spec_hash: b57f7fe72b7083fa0c7ed0ec30569810
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-00c303ed3ff51e75fd30ab890a69ebbfde9bcb7c3a64397b081abfdd30c7b212.yml
3+
openapi_spec_hash: 6886ec9a0f6960b8da8ef7309236eefb
44
config_hash: 284c4178d08f75d8c8b29f275948a8fd

src/cloudflare/resources/firewall/lockdowns.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def create(
7979
entered URL will be escaped before use, which means you can only use simple
8080
wildcard patterns.
8181
82-
description: An informative summary of the rate limit. This value is sanitized and any tags
83-
will be removed.
82+
description: An informative summary of the rule. This value is sanitized and any tags will be
83+
removed.
8484
8585
paused: When true, indicates that the rule is currently paused.
8686
@@ -413,8 +413,8 @@ async def create(
413413
entered URL will be escaped before use, which means you can only use simple
414414
wildcard patterns.
415415
416-
description: An informative summary of the rate limit. This value is sanitized and any tags
417-
will be removed.
416+
description: An informative summary of the rule. This value is sanitized and any tags will be
417+
removed.
418418
419419
paused: When true, indicates that the rule is currently paused.
420420

src/cloudflare/resources/firewall/ua_rules.py

Lines changed: 133 additions & 127 deletions
Large diffs are not rendered by default.

src/cloudflare/types/firewall/lockdown_create_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class LockdownCreateParams(TypedDict, total=False):
3030
"""
3131

3232
description: str
33-
"""An informative summary of the rate limit.
33+
"""An informative summary of the rule.
3434
3535
This value is sanitized and any tags will be removed.
3636
"""

src/cloudflare/types/firewall/ua_rule_create_params.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ class UARuleCreateParams(TypedDict, total=False):
1616
mode: Required[Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"]]
1717
"""The action to apply to a matched request."""
1818

19+
description: str
20+
"""An informative summary of the rule.
21+
22+
This value is sanitized and any tags will be removed.
23+
"""
24+
25+
paused: bool
26+
"""When true, indicates that the rule is currently paused."""
27+
1928

2029
class Configuration(TypedDict, total=False):
2130
target: Literal["ua"]
Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,39 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Union, Optional
4-
from typing_extensions import TypeAlias
3+
from typing import Optional
4+
from typing_extensions import Literal
55

6-
__all__ = ["UARuleCreateResponse"]
6+
from ..._models import BaseModel
77

8-
UARuleCreateResponse: TypeAlias = Union[Optional[str], Optional[object]]
8+
__all__ = ["UARuleCreateResponse", "Configuration"]
9+
10+
11+
class Configuration(BaseModel):
12+
target: Optional[str] = None
13+
"""The configuration target for this rule.
14+
15+
You must set the target to `ua` for User Agent Blocking rules.
16+
"""
17+
18+
value: Optional[str] = None
19+
"""The exact user agent string to match.
20+
21+
This value will be compared to the received `User-Agent` HTTP header value.
22+
"""
23+
24+
25+
class UARuleCreateResponse(BaseModel):
26+
id: Optional[str] = None
27+
"""The unique identifier of the User Agent Blocking rule."""
28+
29+
configuration: Optional[Configuration] = None
30+
"""The configuration object for the current rule."""
31+
32+
description: Optional[str] = None
33+
"""An informative summary of the rule."""
34+
35+
mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None
36+
"""The action to apply to a matched request."""
37+
38+
paused: Optional[bool] = None
39+
"""When true, indicates that the rule is currently paused."""
Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,39 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
from typing import Optional
4+
from typing_extensions import Literal
45

56
from ..._models import BaseModel
67

7-
__all__ = ["UARuleDeleteResponse"]
8+
__all__ = ["UARuleDeleteResponse", "Configuration"]
9+
10+
11+
class Configuration(BaseModel):
12+
target: Optional[str] = None
13+
"""The configuration target for this rule.
14+
15+
You must set the target to `ua` for User Agent Blocking rules.
16+
"""
17+
18+
value: Optional[str] = None
19+
"""The exact user agent string to match.
20+
21+
This value will be compared to the received `User-Agent` HTTP header value.
22+
"""
823

924

1025
class UARuleDeleteResponse(BaseModel):
1126
id: Optional[str] = None
1227
"""The unique identifier of the User Agent Blocking rule."""
28+
29+
configuration: Optional[Configuration] = None
30+
"""The configuration object for the current rule."""
31+
32+
description: Optional[str] = None
33+
"""An informative summary of the rule."""
34+
35+
mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None
36+
"""The action to apply to a matched request."""
37+
38+
paused: Optional[bool] = None
39+
"""When true, indicates that the rule is currently paused."""
Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,39 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Union, Optional
4-
from typing_extensions import TypeAlias
3+
from typing import Optional
4+
from typing_extensions import Literal
55

6-
__all__ = ["UARuleGetResponse"]
6+
from ..._models import BaseModel
77

8-
UARuleGetResponse: TypeAlias = Union[Optional[str], Optional[object]]
8+
__all__ = ["UARuleGetResponse", "Configuration"]
9+
10+
11+
class Configuration(BaseModel):
12+
target: Optional[str] = None
13+
"""The configuration target for this rule.
14+
15+
You must set the target to `ua` for User Agent Blocking rules.
16+
"""
17+
18+
value: Optional[str] = None
19+
"""The exact user agent string to match.
20+
21+
This value will be compared to the received `User-Agent` HTTP header value.
22+
"""
23+
24+
25+
class UARuleGetResponse(BaseModel):
26+
id: Optional[str] = None
27+
"""The unique identifier of the User Agent Blocking rule."""
28+
29+
configuration: Optional[Configuration] = None
30+
"""The configuration object for the current rule."""
31+
32+
description: Optional[str] = None
33+
"""An informative summary of the rule."""
34+
35+
mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None
36+
"""The action to apply to a matched request."""
37+
38+
paused: Optional[bool] = None
39+
"""When true, indicates that the rule is currently paused."""

src/cloudflare/types/firewall/ua_rule_list_params.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ class UARuleListParams(TypedDict, total=False):
1414
description: str
1515
"""A string to search for in the description of existing rules."""
1616

17-
description_search: str
18-
"""A string to search for in the description of existing rules."""
19-
2017
page: float
2118
"""Page number of paginated results."""
2219

20+
paused: bool
21+
"""When true, indicates that the rule is currently paused."""
22+
2323
per_page: float
2424
"""The maximum number of results per page.
2525
2626
You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`,
2727
or `20`.
2828
"""
2929

30-
ua_search: str
30+
user_agent: str
3131
"""A string to search for in the user agent values of existing rules."""

src/cloudflare/types/firewall/ua_rule_update_params.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ class UARuleUpdateParams(TypedDict, total=False):
2424
mode: Required[Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"]]
2525
"""The action to apply to a matched request."""
2626

27+
description: str
28+
"""An informative summary of the rule.
29+
30+
This value is sanitized and any tags will be removed.
31+
"""
32+
33+
paused: bool
34+
"""When true, indicates that the rule is currently paused."""
35+
2736

2837
Configuration: TypeAlias = Union[
2938
AccessRuleIPConfigurationParam,

0 commit comments

Comments
 (0)