From ca75916dd0ec371684a423cc44ec53b32cc79523 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 Mar 2024 15:30:03 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#172) --- src/cloudflare/types/zero_trust/access/access_apps.py | 9 +++++++++ .../types/zero_trust/access/application_create_params.py | 9 +++++++++ .../types/zero_trust/access/application_update_params.py | 9 +++++++++ .../api_resources/zero_trust/access/test_applications.py | 4 ++++ 4 files changed, 31 insertions(+) diff --git a/src/cloudflare/types/zero_trust/access/access_apps.py b/src/cloudflare/types/zero_trust/access/access_apps.py index 1d1054b153f..24dffb93b53 100644 --- a/src/cloudflare/types/zero_trust/access/access_apps.py +++ b/src/cloudflare/types/zero_trust/access/access_apps.py @@ -242,6 +242,15 @@ class SaaSApplicationSaasAppAccessSamlSaasApp(BaseModel): public_key: Optional[str] = None """The Access public certificate that will be used to verify your identity.""" + saml_attribute_transform_jsonata: Optional[str] = None + """ + A [JSONata] (https://jsonata.org/) expression that transforms an application's + user identities into attribute assertions in the SAML response. The expression + can transform id, email, name, and groups values. It can also transform fields + listed in the saml_attributes or oidc_fields of the identity provider used to + authenticate. The output of this expression must be a JSON object. + """ + sp_entity_id: Optional[str] = None """A globally unique name for an identity or service provider.""" diff --git a/src/cloudflare/types/zero_trust/access/application_create_params.py b/src/cloudflare/types/zero_trust/access/application_create_params.py index e1d47050dff..c20de09cd43 100644 --- a/src/cloudflare/types/zero_trust/access/application_create_params.py +++ b/src/cloudflare/types/zero_trust/access/application_create_params.py @@ -276,6 +276,15 @@ class SaaSApplicationSaasAppAccessSamlSaasApp(TypedDict, total=False): public_key: str """The Access public certificate that will be used to verify your identity.""" + saml_attribute_transform_jsonata: str + """ + A [JSONata] (https://jsonata.org/) expression that transforms an application's + user identities into attribute assertions in the SAML response. The expression + can transform id, email, name, and groups values. It can also transform fields + listed in the saml_attributes or oidc_fields of the identity provider used to + authenticate. The output of this expression must be a JSON object. + """ + sp_entity_id: str """A globally unique name for an identity or service provider.""" diff --git a/src/cloudflare/types/zero_trust/access/application_update_params.py b/src/cloudflare/types/zero_trust/access/application_update_params.py index bb4ed561281..6bf61790ffe 100644 --- a/src/cloudflare/types/zero_trust/access/application_update_params.py +++ b/src/cloudflare/types/zero_trust/access/application_update_params.py @@ -276,6 +276,15 @@ class SaaSApplicationSaasAppAccessSamlSaasApp(TypedDict, total=False): public_key: str """The Access public certificate that will be used to verify your identity.""" + saml_attribute_transform_jsonata: str + """ + A [JSONata] (https://jsonata.org/) expression that transforms an application's + user identities into attribute assertions in the SAML response. The expression + can transform id, email, name, and groups values. It can also transform fields + listed in the saml_attributes or oidc_fields of the identity provider used to + authenticate. The output of this expression must be a JSON object. + """ + sp_entity_id: str """A globally unique name for an identity or service provider.""" diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py index c416ee106ec..edb66e5d907 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.py @@ -173,6 +173,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N "name_id_format": "id", "name_id_transform_jsonata": "$substringBefore(email, '@') & '+sandbox@' & $substringAfter(email, '@')", "public_key": "example unique name", + "saml_attribute_transform_jsonata": "$ ~>| groups | {'group_name': name} |", "sp_entity_id": "example unique name", "sso_endpoint": "https://example.cloudflareaccess.com/cdn-cgi/access/sso/saml/b3f58a2b414e0b51d45c8c2af26fccca0e27c63763c426fa52f98dcf0b3b3bfd", }, @@ -893,6 +894,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N "name_id_format": "id", "name_id_transform_jsonata": "$substringBefore(email, '@') & '+sandbox@' & $substringAfter(email, '@')", "public_key": "example unique name", + "saml_attribute_transform_jsonata": "$ ~>| groups | {'group_name': name} |", "sp_entity_id": "example unique name", "sso_endpoint": "https://example.cloudflareaccess.com/cdn-cgi/access/sso/saml/b3f58a2b414e0b51d45c8c2af26fccca0e27c63763c426fa52f98dcf0b3b3bfd", }, @@ -1911,6 +1913,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn "name_id_format": "id", "name_id_transform_jsonata": "$substringBefore(email, '@') & '+sandbox@' & $substringAfter(email, '@')", "public_key": "example unique name", + "saml_attribute_transform_jsonata": "$ ~>| groups | {'group_name': name} |", "sp_entity_id": "example unique name", "sso_endpoint": "https://example.cloudflareaccess.com/cdn-cgi/access/sso/saml/b3f58a2b414e0b51d45c8c2af26fccca0e27c63763c426fa52f98dcf0b3b3bfd", }, @@ -2631,6 +2634,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn "name_id_format": "id", "name_id_transform_jsonata": "$substringBefore(email, '@') & '+sandbox@' & $substringAfter(email, '@')", "public_key": "example unique name", + "saml_attribute_transform_jsonata": "$ ~>| groups | {'group_name': name} |", "sp_entity_id": "example unique name", "sso_endpoint": "https://example.cloudflareaccess.com/cdn-cgi/access/sso/saml/b3f58a2b414e0b51d45c8c2af26fccca0e27c63763c426fa52f98dcf0b3b3bfd", },