Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Mar 22, 2024
1 parent d5e5eb5 commit ff93dde
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/cloudflare/types/zero_trust/access/access_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down
4 changes: 4 additions & 0 deletions tests/api_resources/zero_trust/access/test_applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down Expand Up @@ -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",
},
Expand Down Expand Up @@ -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",
},
Expand Down Expand Up @@ -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",
},
Expand Down

0 comments on commit ff93dde

Please sign in to comment.