Skip to content

Commit 72acad6

Browse files
feat(api): api update (#2245)
1 parent 6b47b7d commit 72acad6

12 files changed

+83
-18
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1448
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5d9269029aa80ea06158ff1156ec30914cbeca10b8893ba9ef2df46511e10aae.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0530d6510c5b139af850d24a4f932d5139c8d321a955ffa101b0debafbd75465.yml

api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5131,7 +5131,7 @@ Methods:
51315131

51325132
- <code title="post /{account_or_zone}/{account_or_zone_id}/access/identity_providers">client.zero_trust.identity_providers.<a href="./src/cloudflare/resources/zero_trust/identity_providers.py">create</a>(\*, account_id, zone_id, \*\*<a href="src/cloudflare/types/zero_trust/identity_provider_create_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/identity_provider.py">Optional[IdentityProvider]</a></code>
51335133
- <code title="put /{account_or_zone}/{account_or_zone_id}/access/identity_providers/{identity_provider_id}">client.zero_trust.identity_providers.<a href="./src/cloudflare/resources/zero_trust/identity_providers.py">update</a>(identity_provider_id, \*, account_id, zone_id, \*\*<a href="src/cloudflare/types/zero_trust/identity_provider_update_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/identity_provider.py">Optional[IdentityProvider]</a></code>
5134-
- <code title="get /{account_or_zone}/{account_or_zone_id}/access/identity_providers">client.zero_trust.identity_providers.<a href="./src/cloudflare/resources/zero_trust/identity_providers.py">list</a>(\*, account_id, zone_id) -> <a href="./src/cloudflare/types/zero_trust/identity_provider_list_response.py">SyncSinglePage[IdentityProviderListResponse]</a></code>
5134+
- <code title="get /{account_or_zone}/{account_or_zone_id}/access/identity_providers">client.zero_trust.identity_providers.<a href="./src/cloudflare/resources/zero_trust/identity_providers.py">list</a>(\*, account_id, zone_id, \*\*<a href="src/cloudflare/types/zero_trust/identity_provider_list_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/identity_provider_list_response.py">SyncSinglePage[IdentityProviderListResponse]</a></code>
51355135
- <code title="delete /{account_or_zone}/{account_or_zone_id}/access/identity_providers/{identity_provider_id}">client.zero_trust.identity_providers.<a href="./src/cloudflare/resources/zero_trust/identity_providers.py">delete</a>(identity_provider_id, \*, account_id, zone_id) -> <a href="./src/cloudflare/types/zero_trust/identity_provider_delete_response.py">Optional[IdentityProviderDeleteResponse]</a></code>
51365136
- <code title="get /{account_or_zone}/{account_or_zone_id}/access/identity_providers/{identity_provider_id}">client.zero_trust.identity_providers.<a href="./src/cloudflare/resources/zero_trust/identity_providers.py">get</a>(identity_provider_id, \*, account_id, zone_id) -> <a href="./src/cloudflare/types/zero_trust/identity_provider.py">Optional[IdentityProvider]</a></code>
51375137

src/cloudflare/resources/zero_trust/identity_providers.py

+23-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from ..._base_client import AsyncPaginator, make_request_options
2727
from ...types.zero_trust import (
2828
IdentityProviderType,
29+
identity_provider_list_params,
2930
identity_provider_create_params,
3031
identity_provider_update_params,
3132
)
@@ -1585,6 +1586,7 @@ def list(
15851586
*,
15861587
account_id: str | NotGiven = NOT_GIVEN,
15871588
zone_id: str | NotGiven = NOT_GIVEN,
1589+
scim_enabled: str | NotGiven = NOT_GIVEN,
15881590
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
15891591
# The extra values given here take precedence over values defined on the client or passed to this method.
15901592
extra_headers: Headers | None = None,
@@ -1600,6 +1602,9 @@ def list(
16001602
16011603
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
16021604
1605+
scim_enabled: Indicates to Access to only retrieve identity providers that have the System for
1606+
Cross-Domain Identity Management (SCIM) enabled.
1607+
16031608
extra_headers: Send extra headers
16041609
16051610
extra_query: Add additional query parameters to the request
@@ -1624,7 +1629,13 @@ def list(
16241629
f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers",
16251630
page=SyncSinglePage[IdentityProviderListResponse],
16261631
options=make_request_options(
1627-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1632+
extra_headers=extra_headers,
1633+
extra_query=extra_query,
1634+
extra_body=extra_body,
1635+
timeout=timeout,
1636+
query=maybe_transform(
1637+
{"scim_enabled": scim_enabled}, identity_provider_list_params.IdentityProviderListParams
1638+
),
16281639
),
16291640
model=cast(
16301641
Any, IdentityProviderListResponse
@@ -3301,6 +3312,7 @@ def list(
33013312
*,
33023313
account_id: str | NotGiven = NOT_GIVEN,
33033314
zone_id: str | NotGiven = NOT_GIVEN,
3315+
scim_enabled: str | NotGiven = NOT_GIVEN,
33043316
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
33053317
# The extra values given here take precedence over values defined on the client or passed to this method.
33063318
extra_headers: Headers | None = None,
@@ -3316,6 +3328,9 @@ def list(
33163328
33173329
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
33183330
3331+
scim_enabled: Indicates to Access to only retrieve identity providers that have the System for
3332+
Cross-Domain Identity Management (SCIM) enabled.
3333+
33193334
extra_headers: Send extra headers
33203335
33213336
extra_query: Add additional query parameters to the request
@@ -3340,7 +3355,13 @@ def list(
33403355
f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers",
33413356
page=AsyncSinglePage[IdentityProviderListResponse],
33423357
options=make_request_options(
3343-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
3358+
extra_headers=extra_headers,
3359+
extra_query=extra_query,
3360+
extra_body=extra_body,
3361+
timeout=timeout,
3362+
query=maybe_transform(
3363+
{"scim_enabled": scim_enabled}, identity_provider_list_params.IdentityProviderListParams
3364+
),
33443365
),
33453366
model=cast(
33463367
Any, IdentityProviderListResponse

src/cloudflare/types/zero_trust/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
from .organization_create_params import OrganizationCreateParams as OrganizationCreateParams
6868
from .organization_update_params import OrganizationUpdateParams as OrganizationUpdateParams
6969
from .any_valid_service_token_rule import AnyValidServiceTokenRule as AnyValidServiceTokenRule
70+
from .identity_provider_list_params import IdentityProviderListParams as IdentityProviderListParams
7071
from .identity_provider_scim_config import IdentityProviderSCIMConfig as IdentityProviderSCIMConfig
7172
from .external_evaluation_rule_param import ExternalEvaluationRuleParam as ExternalEvaluationRuleParam
7273
from .github_organization_rule_param import GitHubOrganizationRuleParam as GitHubOrganizationRuleParam

src/cloudflare/types/zero_trust/identity_provider.py

+3
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ class AccessOIDCConfig(BaseModel):
275275
email_claim_name: Optional[str] = None
276276
"""The claim name for email in the id_token response."""
277277

278+
pkce_enabled: Optional[bool] = None
279+
"""Enable Proof Key for Code Exchange (PKCE)"""
280+
278281
scopes: Optional[List[str]] = None
279282
"""OAuth scopes"""
280283

src/cloudflare/types/zero_trust/identity_provider_create_params.py

+3
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ class AccessOIDCConfig(TypedDict, total=False):
393393
email_claim_name: str
394394
"""The claim name for email in the id_token response."""
395395

396+
pkce_enabled: bool
397+
"""Enable Proof Key for Code Exchange (PKCE)"""
398+
396399
scopes: List[str]
397400
"""OAuth scopes"""
398401

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import TypedDict
6+
7+
__all__ = ["IdentityProviderListParams"]
8+
9+
10+
class IdentityProviderListParams(TypedDict, total=False):
11+
account_id: str
12+
"""The Account ID to use for this endpoint. Mutually exclusive with the Zone ID."""
13+
14+
zone_id: str
15+
"""The Zone ID to use for this endpoint. Mutually exclusive with the Account ID."""
16+
17+
scim_enabled: str
18+
"""
19+
Indicates to Access to only retrieve identity providers that have the System for
20+
Cross-Domain Identity Management (SCIM) enabled.
21+
"""

src/cloudflare/types/zero_trust/identity_provider_list_response.py

+3
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ class AccessOIDCConfig(BaseModel):
273273
email_claim_name: Optional[str] = None
274274
"""The claim name for email in the id_token response."""
275275

276+
pkce_enabled: Optional[bool] = None
277+
"""Enable Proof Key for Code Exchange (PKCE)"""
278+
276279
scopes: Optional[List[str]] = None
277280
"""OAuth scopes"""
278281

src/cloudflare/types/zero_trust/identity_provider_scim_config.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ class IdentityProviderSCIMConfig(BaseModel):
1212
enabled: Optional[bool] = None
1313
"""A flag to enable or disable SCIM for the identity provider."""
1414

15-
identity_update_behavior: Optional[Literal["automatic", "reauth"]] = None
16-
"""Indicates how a SCIM event updates an Access identity.
17-
18-
Use "automatic" to automatically update a user's Access identity and augment it
19-
with fields from the SCIM user resource. Use "reauth" to force re-authentication
20-
on group membership updates. With "reauth" Access identities will not contain
21-
fields from the SCIM user resource.
15+
identity_update_behavior: Optional[Literal["automatic", "reauth", "no_action"]] = None
16+
"""Indicates how a SCIM event updates a user identity used for policy evaluation.
17+
18+
Use "automatic" to automatically update a user's identity and augment it with
19+
fields from the SCIM user resource. Use "reauth" to force re-authentication on
20+
group membership updates, user identity update will only occur after successful
21+
re-authentication. With "reauth" identities will not contain fields from the
22+
SCIM user resource. With "no_action" identities will not be changed by SCIM
23+
updates in any way and users will not be prompted to reauthenticate.
2224
"""
2325

2426
seat_deprovision: Optional[bool] = None

src/cloudflare/types/zero_trust/identity_provider_scim_config_param.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ class IdentityProviderSCIMConfigParam(TypedDict, total=False):
1111
enabled: bool
1212
"""A flag to enable or disable SCIM for the identity provider."""
1313

14-
identity_update_behavior: Literal["automatic", "reauth"]
15-
"""Indicates how a SCIM event updates an Access identity.
16-
17-
Use "automatic" to automatically update a user's Access identity and augment it
18-
with fields from the SCIM user resource. Use "reauth" to force re-authentication
19-
on group membership updates. With "reauth" Access identities will not contain
20-
fields from the SCIM user resource.
14+
identity_update_behavior: Literal["automatic", "reauth", "no_action"]
15+
"""Indicates how a SCIM event updates a user identity used for policy evaluation.
16+
17+
Use "automatic" to automatically update a user's identity and augment it with
18+
fields from the SCIM user resource. Use "reauth" to force re-authentication on
19+
group membership updates, user identity update will only occur after successful
20+
re-authentication. With "reauth" identities will not contain fields from the
21+
SCIM user resource. With "no_action" identities will not be changed by SCIM
22+
updates in any way and users will not be prompted to reauthenticate.
2123
"""
2224

2325
seat_deprovision: bool

src/cloudflare/types/zero_trust/identity_provider_update_params.py

+3
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ class AccessOIDCConfig(TypedDict, total=False):
393393
email_claim_name: str
394394
"""The claim name for email in the id_token response."""
395395

396+
pkce_enabled: bool
397+
"""Enable Proof Key for Code Exchange (PKCE)"""
398+
396399
scopes: List[str]
397400
"""OAuth scopes"""
398401

tests/api_resources/zero_trust/test_identity_providers.py

+6
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N
633633
"client_id": "<your client id>",
634634
"client_secret": "<your client secret>",
635635
"email_claim_name": "custom_claim_name",
636+
"pkce_enabled": True,
636637
"scopes": ["openid", "email", "profile"],
637638
"token_url": "https://accounts.google.com/o/oauth2/token",
638639
},
@@ -1926,6 +1927,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N
19261927
"client_id": "<your client id>",
19271928
"client_secret": "<your client secret>",
19281929
"email_claim_name": "custom_claim_name",
1930+
"pkce_enabled": True,
19291931
"scopes": ["openid", "email", "profile"],
19301932
"token_url": "https://accounts.google.com/o/oauth2/token",
19311933
},
@@ -2617,6 +2619,7 @@ def test_method_list(self, client: Cloudflare) -> None:
26172619
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
26182620
identity_provider = client.zero_trust.identity_providers.list(
26192621
account_id="account_id",
2622+
scim_enabled="scim_enabled",
26202623
)
26212624
assert_matches_type(SyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"])
26222625

@@ -3408,6 +3411,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn
34083411
"client_id": "<your client id>",
34093412
"client_secret": "<your client secret>",
34103413
"email_claim_name": "custom_claim_name",
3414+
"pkce_enabled": True,
34113415
"scopes": ["openid", "email", "profile"],
34123416
"token_url": "https://accounts.google.com/o/oauth2/token",
34133417
},
@@ -4701,6 +4705,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn
47014705
"client_id": "<your client id>",
47024706
"client_secret": "<your client secret>",
47034707
"email_claim_name": "custom_claim_name",
4708+
"pkce_enabled": True,
47044709
"scopes": ["openid", "email", "profile"],
47054710
"token_url": "https://accounts.google.com/o/oauth2/token",
47064711
},
@@ -5392,6 +5397,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
53925397
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
53935398
identity_provider = await async_client.zero_trust.identity_providers.list(
53945399
account_id="account_id",
5400+
scim_enabled="scim_enabled",
53955401
)
53965402
assert_matches_type(AsyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"])
53975403

0 commit comments

Comments
 (0)