Skip to content

Commit c62d748

Browse files
feat(api): aggregated API specs update
1 parent 2a0347f commit c62d748

4 files changed

Lines changed: 16 additions & 10 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: 612
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-7692ff469c0a20a3fde59d14a30c785a1773a8b60e5be9cc1280792a56b3b9e0.yml
3-
openapi_spec_hash: 188c9e304c287741b6a73552c939658f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-9f065df469027bcaa0bd19a36a0f8f132271e837c4cb058f27f3c5c740298797.yml
3+
openapi_spec_hash: 844a27c7d8957769e1fb98965f9f1df0
44
config_hash: 399dda838c78c5d92532b7efcaaa0345

src/gcore/resources/security/profiles.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def create(
5454
*,
5555
fields: Iterable[profile_create_params.Field],
5656
profile_template: int,
57+
site: str,
5758
ip_address: Optional[str] | Omit = omit,
58-
site: str | Omit = omit,
5959
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6060
# The extra values given here take precedence over values defined on the client or passed to this method.
6161
extra_headers: Headers | None = None,
@@ -83,8 +83,8 @@ def create(
8383
{
8484
"fields": fields,
8585
"profile_template": profile_template,
86-
"ip_address": ip_address,
8786
"site": site,
87+
"ip_address": ip_address,
8888
},
8989
profile_create_params.ProfileCreateParams,
9090
),
@@ -322,8 +322,8 @@ async def create(
322322
*,
323323
fields: Iterable[profile_create_params.Field],
324324
profile_template: int,
325+
site: str,
325326
ip_address: Optional[str] | Omit = omit,
326-
site: str | Omit = omit,
327327
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
328328
# The extra values given here take precedence over values defined on the client or passed to this method.
329329
extra_headers: Headers | None = None,
@@ -351,8 +351,8 @@ async def create(
351351
{
352352
"fields": fields,
353353
"profile_template": profile_template,
354-
"ip_address": ip_address,
355354
"site": site,
355+
"ip_address": ip_address,
356356
},
357357
profile_create_params.ProfileCreateParams,
358358
),

src/gcore/types/security/profile_create_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ class ProfileCreateParams(TypedDict, total=False):
1313

1414
profile_template: Required[int]
1515

16-
ip_address: Optional[str]
16+
site: Required[str]
1717

18-
site: str
18+
ip_address: Optional[str]
1919

2020

2121
class Field(TypedDict, total=False):

tests/api_resources/security/test_profiles.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def test_method_create(self, client: Gcore) -> None:
2525
profile = client.security.profiles.create(
2626
fields=[{"base_field": 1}],
2727
profile_template=1,
28+
site="GNC",
2829
)
2930
assert_matches_type(ClientProfile, profile, path=["response"])
3031

@@ -38,8 +39,8 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
3839
}
3940
],
4041
profile_template=1,
42+
site="GNC",
4143
ip_address="123.43.2.10",
42-
site="ED",
4344
)
4445
assert_matches_type(ClientProfile, profile, path=["response"])
4546

@@ -48,6 +49,7 @@ def test_raw_response_create(self, client: Gcore) -> None:
4849
response = client.security.profiles.with_raw_response.create(
4950
fields=[{"base_field": 1}],
5051
profile_template=1,
52+
site="GNC",
5153
)
5254

5355
assert response.is_closed is True
@@ -60,6 +62,7 @@ def test_streaming_response_create(self, client: Gcore) -> None:
6062
with client.security.profiles.with_streaming_response.create(
6163
fields=[{"base_field": 1}],
6264
profile_template=1,
65+
site="GNC",
6366
) as response:
6467
assert not response.is_closed
6568
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -283,6 +286,7 @@ async def test_method_create(self, async_client: AsyncGcore) -> None:
283286
profile = await async_client.security.profiles.create(
284287
fields=[{"base_field": 1}],
285288
profile_template=1,
289+
site="GNC",
286290
)
287291
assert_matches_type(ClientProfile, profile, path=["response"])
288292

@@ -296,8 +300,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
296300
}
297301
],
298302
profile_template=1,
303+
site="GNC",
299304
ip_address="123.43.2.10",
300-
site="ED",
301305
)
302306
assert_matches_type(ClientProfile, profile, path=["response"])
303307

@@ -306,6 +310,7 @@ async def test_raw_response_create(self, async_client: AsyncGcore) -> None:
306310
response = await async_client.security.profiles.with_raw_response.create(
307311
fields=[{"base_field": 1}],
308312
profile_template=1,
313+
site="GNC",
309314
)
310315

311316
assert response.is_closed is True
@@ -318,6 +323,7 @@ async def test_streaming_response_create(self, async_client: AsyncGcore) -> None
318323
async with async_client.security.profiles.with_streaming_response.create(
319324
fields=[{"base_field": 1}],
320325
profile_template=1,
326+
site="GNC",
321327
) as response:
322328
assert not response.is_closed
323329
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

0 commit comments

Comments
 (0)