Skip to content

Commit f1ff659

Browse files
feat(api): aggregated API specs update
1 parent 9482c47 commit f1ff659

25 files changed

Lines changed: 184 additions & 207 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 524
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-b473743ee0ba83806f1c8fad37c8dc55062a7d64b726e4ce2ee7e6ed679500a0.yml
3-
openapi_spec_hash: 990a444fc9f47cee9b92c1fc8915f6ac
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-b274569f3b7b4720901d8180f3ce6072354a76aebcba71034efacc0d7c2e86af.yml
3+
openapi_spec_hash: 23852eed0d43bf23e4bdce79570b7742
44
config_hash: b2097de8bb0184ce4379a853a61ef740

src/gcore/resources/waap/domains/advanced_rules.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def create(
5353
enabled: bool,
5454
name: str,
5555
source: str,
56-
description: Optional[str] | Omit = omit,
56+
description: str | Omit = omit,
5757
phase: Optional[Literal["access", "header_filter", "body_filter"]] | Omit = omit,
5858
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5959
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -68,7 +68,8 @@ def create(
6868
Args:
6969
domain_id: The domain ID
7070
71-
action: The action that the rule takes when triggered
71+
action: The action that the rule takes when triggered. Only one action can be set per
72+
rule.
7273
7374
enabled: Whether or not the rule is enabled
7475
@@ -141,7 +142,7 @@ def update(
141142
142143
rule_id: The advanced rule ID
143144
144-
action: The action that a WAAP rule takes when triggered
145+
action: The action that a WAAP rule takes when triggered.
145146
146147
description: The description assigned to the rule
147148
@@ -429,7 +430,7 @@ async def create(
429430
enabled: bool,
430431
name: str,
431432
source: str,
432-
description: Optional[str] | Omit = omit,
433+
description: str | Omit = omit,
433434
phase: Optional[Literal["access", "header_filter", "body_filter"]] | Omit = omit,
434435
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
435436
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -444,7 +445,8 @@ async def create(
444445
Args:
445446
domain_id: The domain ID
446447
447-
action: The action that the rule takes when triggered
448+
action: The action that the rule takes when triggered. Only one action can be set per
449+
rule.
448450
449451
enabled: Whether or not the rule is enabled
450452
@@ -517,7 +519,7 @@ async def update(
517519
518520
rule_id: The advanced rule ID
519521
520-
action: The action that a WAAP rule takes when triggered
522+
action: The action that a WAAP rule takes when triggered.
521523
522524
description: The description assigned to the rule
523525

src/gcore/resources/waap/domains/api_paths.py

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,6 @@ def create(
7575
path: The API path, locations that are saved for resource IDs will be put in curly
7676
brackets
7777
78-
api_groups: An array of api groups associated with the API path
79-
80-
api_version: The API version
81-
82-
tags: An array of tags associated with the API path
83-
8478
extra_headers: Send extra headers
8579
8680
extra_query: Add additional query parameters to the request
@@ -132,14 +126,10 @@ def update(
132126
133127
path_id: The path ID
134128
135-
api_groups: An array of api groups associated with the API path
136-
137129
path: The updated API path. When updating the path, variables can be renamed, path
138130
parts can be converted to variables and vice versa.
139131
140-
status: The status of the discovered API path
141-
142-
tags: An array of tags associated with the API path
132+
status: The different statuses an API path can have
143133
144134
extra_headers: Send extra headers
145135
@@ -403,12 +393,6 @@ async def create(
403393
path: The API path, locations that are saved for resource IDs will be put in curly
404394
brackets
405395
406-
api_groups: An array of api groups associated with the API path
407-
408-
api_version: The API version
409-
410-
tags: An array of tags associated with the API path
411-
412396
extra_headers: Send extra headers
413397
414398
extra_query: Add additional query parameters to the request
@@ -460,14 +444,10 @@ async def update(
460444
461445
path_id: The path ID
462446
463-
api_groups: An array of api groups associated with the API path
464-
465447
path: The updated API path. When updating the path, variables can be renamed, path
466448
parts can be converted to variables and vice versa.
467449
468-
status: The status of the discovered API path
469-
470-
tags: An array of tags associated with the API path
450+
status: The different statuses an API path can have
471451
472452
extra_headers: Send extra headers
473453

src/gcore/resources/waap/domains/custom_rules.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def create(
5858
conditions: Iterable[custom_rule_create_params.Condition],
5959
enabled: bool,
6060
name: str,
61-
description: Optional[str] | Omit = omit,
61+
description: str | Omit = omit,
6262
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6363
# The extra values given here take precedence over values defined on the client or passed to this method.
6464
extra_headers: Headers | None = None,
@@ -72,7 +72,8 @@ def create(
7272
Args:
7373
domain_id: The domain ID
7474
75-
action: The action that the rule takes when triggered
75+
action: The action that the rule takes when triggered. Only one action can be set per
76+
rule.
7677
7778
conditions: The conditions required for the WAAP engine to trigger the rule. Rules may have
7879
between 1 and 5 conditions. All conditions must pass for the rule to trigger
@@ -134,7 +135,7 @@ def update(
134135
135136
rule_id: The custom rule ID
136137
137-
action: The action that a WAAP rule takes when triggered
138+
action: The action that a WAAP rule takes when triggered.
138139
139140
conditions: The conditions required for the WAAP engine to trigger the rule. Rules may have
140141
between 1 and 5 conditions. All conditions must pass for the rule to trigger
@@ -432,7 +433,7 @@ async def create(
432433
conditions: Iterable[custom_rule_create_params.Condition],
433434
enabled: bool,
434435
name: str,
435-
description: Optional[str] | Omit = omit,
436+
description: str | Omit = omit,
436437
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
437438
# The extra values given here take precedence over values defined on the client or passed to this method.
438439
extra_headers: Headers | None = None,
@@ -446,7 +447,8 @@ async def create(
446447
Args:
447448
domain_id: The domain ID
448449
449-
action: The action that the rule takes when triggered
450+
action: The action that the rule takes when triggered. Only one action can be set per
451+
rule.
450452
451453
conditions: The conditions required for the WAAP engine to trigger the rule. Rules may have
452454
between 1 and 5 conditions. All conditions must pass for the rule to trigger
@@ -508,7 +510,7 @@ async def update(
508510
509511
rule_id: The custom rule ID
510512
511-
action: The action that a WAAP rule takes when triggered
513+
action: The action that a WAAP rule takes when triggered.
512514
513515
conditions: The conditions required for the WAAP engine to trigger the rule. Rules may have
514516
between 1 and 5 conditions. All conditions must pass for the rule to trigger

src/gcore/resources/waap/domains/domains.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def update(
172172
self,
173173
domain_id: int,
174174
*,
175-
status: Literal["active", "monitor"] | Omit = omit,
175+
status: Literal["active", "monitor"],
176176
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
177177
# The extra values given here take precedence over values defined on the client or passed to this method.
178178
extra_headers: Headers | None = None,
@@ -474,7 +474,7 @@ async def update(
474474
self,
475475
domain_id: int,
476476
*,
477-
status: Literal["active", "monitor"] | Omit = omit,
477+
status: Literal["active", "monitor"],
478478
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
479479
# The extra values given here take precedence over values defined on the client or passed to this method.
480480
extra_headers: Headers | None = None,

src/gcore/resources/waap/domains/firewall_rules.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def create(
5858
conditions: Iterable[firewall_rule_create_params.Condition],
5959
enabled: bool,
6060
name: str,
61-
description: Optional[str] | Omit = omit,
61+
description: str | Omit = omit,
6262
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6363
# The extra values given here take precedence over values defined on the client or passed to this method.
6464
extra_headers: Headers | None = None,
@@ -430,7 +430,7 @@ async def create(
430430
conditions: Iterable[firewall_rule_create_params.Condition],
431431
enabled: bool,
432432
name: str,
433-
description: Optional[str] | Omit = omit,
433+
description: str | Omit = omit,
434434
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
435435
# The extra values given here take precedence over values defined on the client or passed to this method.
436436
extra_headers: Headers | None = None,

src/gcore/resources/waap/insights.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def list_types(
7676
7777
ordering: Sort the response by given field.
7878
79-
slug: Filter by the slug of the insight type
79+
slug: The slug of the insight type
8080
8181
extra_headers: Send extra headers
8282
@@ -161,7 +161,7 @@ def list_types(
161161
162162
ordering: Sort the response by given field.
163163
164-
slug: Filter by the slug of the insight type
164+
slug: The slug of the insight type
165165
166166
extra_headers: Send extra headers
167167

src/gcore/types/waap/domain_update_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Literal, TypedDict
5+
from typing_extensions import Literal, Required, TypedDict
66

77
__all__ = ["DomainUpdateParams"]
88

99

1010
class DomainUpdateParams(TypedDict, total=False):
11-
status: Literal["active", "monitor"]
11+
status: Required[Literal["active", "monitor"]]
1212
"""The current status of the domain"""

src/gcore/types/waap/domains/advanced_rule_create_params.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212

1313
class AdvancedRuleCreateParams(TypedDict, total=False):
1414
action: Required[Action]
15-
"""The action that the rule takes when triggered"""
15+
"""The action that the rule takes when triggered.
16+
17+
Only one action can be set per rule.
18+
"""
1619

1720
enabled: Required[bool]
1821
"""Whether or not the rule is enabled"""
@@ -28,7 +31,7 @@ class AdvancedRuleCreateParams(TypedDict, total=False):
2831
https://gcore.com/docs/waap/waap-rules/advanced-rules
2932
"""
3033

31-
description: Optional[str]
34+
description: str
3235
"""The description assigned to the rule"""
3336

3437
phase: Optional[Literal["access", "header_filter", "body_filter"]]
@@ -43,16 +46,16 @@ class AdvancedRuleCreateParams(TypedDict, total=False):
4346

4447

4548
class ActionBlock(TypedDict, total=False):
46-
action_duration: Optional[str]
49+
action_duration: str
4750
"""How long a rule's block action will apply to subsequent requests.
4851
4952
Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or
5053
'd' to represent time format (seconds, minutes, hours, or days). Empty time
5154
intervals are not allowed.
5255
"""
5356

54-
status_code: Optional[Literal[403, 405, 418, 429]]
55-
"""Designates the HTTP status code to deliver when a request is blocked."""
57+
status_code: Literal[403, 405, 418, 429]
58+
"""A custom HTTP status code that the WAAP returns if a rule blocks a request"""
5659

5760

5861
class ActionTag(TypedDict, total=False):
@@ -61,23 +64,23 @@ class ActionTag(TypedDict, total=False):
6164

6265

6366
class Action(TypedDict, total=False):
64-
allow: Optional[object]
67+
allow: object
6568
"""The WAAP allowed the request"""
6669

67-
block: Optional[ActionBlock]
70+
block: ActionBlock
6871
"""
6972
WAAP block action behavior could be configured with response status code and
7073
action duration.
7174
"""
7275

73-
captcha: Optional[object]
76+
captcha: object
7477
"""The WAAP presented the user with a captcha"""
7578

76-
handshake: Optional[object]
79+
handshake: object
7780
"""The WAAP performed automatic browser validation"""
7881

79-
monitor: Optional[object]
82+
monitor: object
8083
"""The WAAP monitored the request but took no action"""
8184

82-
tag: Optional[ActionTag]
85+
tag: ActionTag
8386
"""WAAP tag action gets a list of tags to tag the request scope with"""

src/gcore/types/waap/domains/advanced_rule_update_params.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AdvancedRuleUpdateParams(TypedDict, total=False):
1515
"""The domain ID"""
1616

1717
action: Optional[Action]
18-
"""The action that a WAAP rule takes when triggered"""
18+
"""The action that a WAAP rule takes when triggered."""
1919

2020
description: Optional[str]
2121
"""The description assigned to the rule"""
@@ -46,16 +46,16 @@ class AdvancedRuleUpdateParams(TypedDict, total=False):
4646

4747

4848
class ActionBlock(TypedDict, total=False):
49-
action_duration: Optional[str]
49+
action_duration: str
5050
"""How long a rule's block action will apply to subsequent requests.
5151
5252
Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or
5353
'd' to represent time format (seconds, minutes, hours, or days). Empty time
5454
intervals are not allowed.
5555
"""
5656

57-
status_code: Optional[Literal[403, 405, 418, 429]]
58-
"""Designates the HTTP status code to deliver when a request is blocked."""
57+
status_code: Literal[403, 405, 418, 429]
58+
"""A custom HTTP status code that the WAAP returns if a rule blocks a request"""
5959

6060

6161
class ActionTag(TypedDict, total=False):
@@ -64,23 +64,23 @@ class ActionTag(TypedDict, total=False):
6464

6565

6666
class Action(TypedDict, total=False):
67-
allow: Optional[object]
67+
allow: object
6868
"""The WAAP allowed the request"""
6969

70-
block: Optional[ActionBlock]
70+
block: ActionBlock
7171
"""
7272
WAAP block action behavior could be configured with response status code and
7373
action duration.
7474
"""
7575

76-
captcha: Optional[object]
76+
captcha: object
7777
"""The WAAP presented the user with a captcha"""
7878

79-
handshake: Optional[object]
79+
handshake: object
8080
"""The WAAP performed automatic browser validation"""
8181

82-
monitor: Optional[object]
82+
monitor: object
8383
"""The WAAP monitored the request but took no action"""
8484

85-
tag: Optional[ActionTag]
85+
tag: ActionTag
8686
"""WAAP tag action gets a list of tags to tag the request scope with"""

0 commit comments

Comments
 (0)