Skip to content

Commit d7f30fe

Browse files
ci-stytchStytch Codegen Bot
andauthored
Add DFP verdict reason override endpoints (#266)
Co-authored-by: Stytch Codegen Bot <[email protected]>
1 parent e798ff4 commit d7f30fe

File tree

8 files changed

+279
-21
lines changed

8 files changed

+279
-21
lines changed

stytch/b2b/api/organizations.py

Lines changed: 72 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,24 @@ def create(
149149
150150
- allowed_oauth_tenants: A map of allowed OAuth tenants. If this field is not passed in, the Organization will not allow JIT provisioning by OAuth Tenant. Allowed keys are "slack", "hubspot", and "github".
151151
- claimed_email_domains: A list of email domains that are claimed by the Organization.
152-
- first_party_connected_apps_allowed_type: (no documentation yet)
153-
- allowed_first_party_connected_apps: (no documentation yet)
154-
- third_party_connected_apps_allowed_type: (no documentation yet)
155-
- allowed_third_party_connected_apps: (no documentation yet)
152+
- first_party_connected_apps_allowed_type: The authentication setting that sets the Organization's policy towards first party Connected Apps. The accepted values are:
153+
154+
`ALL_ALLOWED` – any first party Connected App in the Project is permitted for use by Members.
155+
156+
`RESTRICTED` – only first party Connected Apps with IDs in `allowed_first_party_connected_apps` can be used by Members.
157+
158+
`NOT_ALLOWED` – no first party Connected Apps are permitted.
159+
160+
- allowed_first_party_connected_apps: An array of first party Connected App IDs that are allowed for the Organization. Only used when the Organization's `first_party_connected_apps_allowed_type` is `RESTRICTED`.
161+
- third_party_connected_apps_allowed_type: The authentication setting that sets the Organization's policy towards third party Connected Apps. The accepted values are:
162+
163+
`ALL_ALLOWED` – any third party Connected App in the Project is permitted for use by Members.
164+
165+
`RESTRICTED` – only third party Connected Apps with IDs in `allowed_first_party_connected_apps` can be used by Members.
166+
167+
`NOT_ALLOWED` – no third party Connected Apps are permitted.
168+
169+
- allowed_third_party_connected_apps: An array of third party Connected App IDs that are allowed for the Organization. Only used when the Organization's `third_party_connected_apps_allowed_type` is `RESTRICTED`.
156170
""" # noqa
157171
headers: Dict[str, str] = {}
158172
data: Dict[str, Any] = {
@@ -317,10 +331,24 @@ async def create_async(
317331
318332
- allowed_oauth_tenants: A map of allowed OAuth tenants. If this field is not passed in, the Organization will not allow JIT provisioning by OAuth Tenant. Allowed keys are "slack", "hubspot", and "github".
319333
- claimed_email_domains: A list of email domains that are claimed by the Organization.
320-
- first_party_connected_apps_allowed_type: (no documentation yet)
321-
- allowed_first_party_connected_apps: (no documentation yet)
322-
- third_party_connected_apps_allowed_type: (no documentation yet)
323-
- allowed_third_party_connected_apps: (no documentation yet)
334+
- first_party_connected_apps_allowed_type: The authentication setting that sets the Organization's policy towards first party Connected Apps. The accepted values are:
335+
336+
`ALL_ALLOWED` – any first party Connected App in the Project is permitted for use by Members.
337+
338+
`RESTRICTED` – only first party Connected Apps with IDs in `allowed_first_party_connected_apps` can be used by Members.
339+
340+
`NOT_ALLOWED` – no first party Connected Apps are permitted.
341+
342+
- allowed_first_party_connected_apps: An array of first party Connected App IDs that are allowed for the Organization. Only used when the Organization's `first_party_connected_apps_allowed_type` is `RESTRICTED`.
343+
- third_party_connected_apps_allowed_type: The authentication setting that sets the Organization's policy towards third party Connected Apps. The accepted values are:
344+
345+
`ALL_ALLOWED` – any third party Connected App in the Project is permitted for use by Members.
346+
347+
`RESTRICTED` – only third party Connected Apps with IDs in `allowed_first_party_connected_apps` can be used by Members.
348+
349+
`NOT_ALLOWED` – no third party Connected Apps are permitted.
350+
351+
- allowed_third_party_connected_apps: An array of third party Connected App IDs that are allowed for the Organization. Only used when the Organization's `third_party_connected_apps_allowed_type` is `RESTRICTED`.
324352
""" # noqa
325353
headers: Dict[str, str] = {}
326354
data: Dict[str, Any] = {
@@ -563,10 +591,24 @@ def update(
563591
564592
If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.settings.allowed-oauth-tenants` action on the `stytch.organization` Resource.
565593
- claimed_email_domains: A list of email domains that are claimed by the Organization.
566-
- first_party_connected_apps_allowed_type: (no documentation yet)
567-
- allowed_first_party_connected_apps: (no documentation yet)
568-
- third_party_connected_apps_allowed_type: (no documentation yet)
569-
- allowed_third_party_connected_apps: (no documentation yet)
594+
- first_party_connected_apps_allowed_type: The authentication setting that sets the Organization's policy towards first party Connected Apps. The accepted values are:
595+
596+
`ALL_ALLOWED` – any first party Connected App in the Project is permitted for use by Members.
597+
598+
`RESTRICTED` – only first party Connected Apps with IDs in `allowed_first_party_connected_apps` can be used by Members.
599+
600+
`NOT_ALLOWED` – no first party Connected Apps are permitted.
601+
602+
- allowed_first_party_connected_apps: An array of first party Connected App IDs that are allowed for the Organization. Only used when the Organization's `first_party_connected_apps_allowed_type` is `RESTRICTED`.
603+
- third_party_connected_apps_allowed_type: The authentication setting that sets the Organization's policy towards third party Connected Apps. The accepted values are:
604+
605+
`ALL_ALLOWED` – any third party Connected App in the Project is permitted for use by Members.
606+
607+
`RESTRICTED` – only third party Connected Apps with IDs in `allowed_first_party_connected_apps` can be used by Members.
608+
609+
`NOT_ALLOWED` – no third party Connected Apps are permitted.
610+
611+
- allowed_third_party_connected_apps: An array of third party Connected App IDs that are allowed for the Organization. Only used when the Organization's `third_party_connected_apps_allowed_type` is `RESTRICTED`.
570612
""" # noqa
571613
headers: Dict[str, str] = {}
572614
if method_options is not None:
@@ -783,10 +825,24 @@ async def update_async(
783825
784826
If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.settings.allowed-oauth-tenants` action on the `stytch.organization` Resource.
785827
- claimed_email_domains: A list of email domains that are claimed by the Organization.
786-
- first_party_connected_apps_allowed_type: (no documentation yet)
787-
- allowed_first_party_connected_apps: (no documentation yet)
788-
- third_party_connected_apps_allowed_type: (no documentation yet)
789-
- allowed_third_party_connected_apps: (no documentation yet)
828+
- first_party_connected_apps_allowed_type: The authentication setting that sets the Organization's policy towards first party Connected Apps. The accepted values are:
829+
830+
`ALL_ALLOWED` – any first party Connected App in the Project is permitted for use by Members.
831+
832+
`RESTRICTED` – only first party Connected Apps with IDs in `allowed_first_party_connected_apps` can be used by Members.
833+
834+
`NOT_ALLOWED` – no first party Connected Apps are permitted.
835+
836+
- allowed_first_party_connected_apps: An array of first party Connected App IDs that are allowed for the Organization. Only used when the Organization's `first_party_connected_apps_allowed_type` is `RESTRICTED`.
837+
- third_party_connected_apps_allowed_type: The authentication setting that sets the Organization's policy towards third party Connected Apps. The accepted values are:
838+
839+
`ALL_ALLOWED` – any third party Connected App in the Project is permitted for use by Members.
840+
841+
`RESTRICTED` – only third party Connected Apps with IDs in `allowed_first_party_connected_apps` can be used by Members.
842+
843+
`NOT_ALLOWED` – no third party Connected Apps are permitted.
844+
845+
- allowed_third_party_connected_apps: An array of third party Connected App IDs that are allowed for the Organization. Only used when the Organization's `third_party_connected_apps_allowed_type` is `RESTRICTED`.
790846
""" # noqa
791847
headers: Dict[str, str] = {}
792848
if method_options is not None:

stytch/b2b/api/passwords_discovery_email.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def reset_start(
5252
verifies the request by querying Stytch's discovery authenticate endpoint and continues the flow. If this value is not passed, the default
5353
discovery redirect URL that you set in your Dashboard is used. If you have not set a default discovery redirect URL, an error is returned.
5454
- reset_password_template_id: Use a custom template for reset password emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Passwords - Reset Password.
55-
- reset_password_expiration_minutes: Sets a time limit after which the email link to reset the member's password will no longer be valid.
55+
- reset_password_expiration_minutes: Sets a time limit after which the email link to reset the member's password will no longer be valid. The minimum allowed expiration is 5 minutes and the maximum is 10080 minutes (7 days). By default, the expiration is 30 minutes.
5656
- pkce_code_challenge: (no documentation yet)
5757
- locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
5858
@@ -118,7 +118,7 @@ async def reset_start_async(
118118
verifies the request by querying Stytch's discovery authenticate endpoint and continues the flow. If this value is not passed, the default
119119
discovery redirect URL that you set in your Dashboard is used. If you have not set a default discovery redirect URL, an error is returned.
120120
- reset_password_template_id: Use a custom template for reset password emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Passwords - Reset Password.
121-
- reset_password_expiration_minutes: Sets a time limit after which the email link to reset the member's password will no longer be valid.
121+
- reset_password_expiration_minutes: Sets a time limit after which the email link to reset the member's password will no longer be valid. The minimum allowed expiration is 5 minutes and the maximum is 10080 minutes (7 days). By default, the expiration is 30 minutes.
122122
- pkce_code_challenge: (no documentation yet)
123123
- locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
124124

stytch/b2b/api/passwords_email.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def reset_start(
5454
- reset_password_redirect_url: The URL that the Member clicks from the reset password link. This URL should be an endpoint in the backend server that verifies the request by querying
5555
Stytch's authenticate endpoint and finishes the reset password flow. If this value is not passed, the default `reset_password_redirect_url` that you set in your Dashboard is used.
5656
If you have not set a default `reset_password_redirect_url`, an error is returned.
57-
- reset_password_expiration_minutes: Sets a time limit after which the email link to reset the member's password will no longer be valid.
57+
- reset_password_expiration_minutes: Sets a time limit after which the email link to reset the member's password will no longer be valid. The minimum allowed expiration is 5 minutes and the maximum is 10080 minutes (7 days). By default, the expiration is 30 minutes.
5858
- code_challenge: A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device.
5959
- login_redirect_url: The URL that the member clicks from the reset without password link. This URL should be an endpoint in the backend server
6060
that verifies the request by querying Stytch's authenticate endpoint and finishes the magic link flow. If this value is not passed, the
@@ -122,7 +122,7 @@ async def reset_start_async(
122122
- reset_password_redirect_url: The URL that the Member clicks from the reset password link. This URL should be an endpoint in the backend server that verifies the request by querying
123123
Stytch's authenticate endpoint and finishes the reset password flow. If this value is not passed, the default `reset_password_redirect_url` that you set in your Dashboard is used.
124124
If you have not set a default `reset_password_redirect_url`, an error is returned.
125-
- reset_password_expiration_minutes: Sets a time limit after which the email link to reset the member's password will no longer be valid.
125+
- reset_password_expiration_minutes: Sets a time limit after which the email link to reset the member's password will no longer be valid. The minimum allowed expiration is 5 minutes and the maximum is 10080 minutes (7 days). By default, the expiration is 30 minutes.
126126
- code_challenge: A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device.
127127
- login_redirect_url: The URL that the member clicks from the reset without password link. This URL should be an endpoint in the backend server
128128
that verifies the request by querying Stytch's authenticate endpoint and finishes the magic link flow. If this value is not passed, the

stytch/consumer/api/fraud.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from stytch.consumer.api.fraud_fingerprint import Fingerprint
1010
from stytch.consumer.api.fraud_rules import Rules
11+
from stytch.consumer.api.fraud_verdict_reasons import VerdictReasons
1112
from stytch.core.api_base import ApiBase
1213
from stytch.core.http.client import AsyncClient, SyncClient
1314

@@ -29,3 +30,8 @@ def __init__(
2930
sync_client=self.sync_client,
3031
async_client=self.async_client,
3132
)
33+
self.verdict_reasons = VerdictReasons(
34+
api_base=self.api_base,
35+
sync_client=self.sync_client,
36+
async_client=self.async_client,
37+
)

0 commit comments

Comments
 (0)