Skip to content

Commit a777166

Browse files
ci-stytchStytch Codegen Bot
andauthored
Publish B2B StartEmailUpdate Endpoint (#273)
Co-authored-by: Stytch Codegen Bot <[email protected]>
1 parent b2d47e7 commit a777166

23 files changed

+269
-105
lines changed

stytch/b2b/api/discovery_intermediate_sessions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def exchange(
3434
) -> ExchangeResponse:
3535
"""Exchange an Intermediate Session for a fully realized [Member Session](https://stytch.com/docs/b2b/api/session-object) for the [Organization](https://stytch.com/docs/b2b/api/organization-object) that the user wishes to log into.
3636
37-
This endpoint can be used to accept invites and into a new Organization on the basis of the user's email domain or OAuth tenant.
37+
This endpoint can be used to accept invites and JIT Provision into a new Organization on the basis of the user's email domain or OAuth tenant.
3838
3939
If the user **has** already satisfied the authentication requirements of the Organization they are trying to exchange into and logged in with a method that verifies their email address, this API will return `member_authenticated: true` and a `session_token` and `session_jwt`.
4040
@@ -65,7 +65,7 @@ def exchange(
6565
`session_duration_minutes`. Claims will be included on the Session object and in the JWT. To update a key in an existing Session, supply a new value. To
6666
delete a key, supply a null value. Custom claims made with reserved claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`) will be ignored.
6767
Total custom claims size cannot exceed four kilobytes.
68-
- locale: If the needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
68+
- locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
6969
7070
Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
7171
@@ -102,7 +102,7 @@ async def exchange_async(
102102
) -> ExchangeResponse:
103103
"""Exchange an Intermediate Session for a fully realized [Member Session](https://stytch.com/docs/b2b/api/session-object) for the [Organization](https://stytch.com/docs/b2b/api/organization-object) that the user wishes to log into.
104104
105-
This endpoint can be used to accept invites and into a new Organization on the basis of the user's email domain or OAuth tenant.
105+
This endpoint can be used to accept invites and JIT Provision into a new Organization on the basis of the user's email domain or OAuth tenant.
106106
107107
If the user **has** already satisfied the authentication requirements of the Organization they are trying to exchange into and logged in with a method that verifies their email address, this API will return `member_authenticated: true` and a `session_token` and `session_jwt`.
108108
@@ -133,7 +133,7 @@ async def exchange_async(
133133
`session_duration_minutes`. Claims will be included on the Session object and in the JWT. To update a key in an existing Session, supply a new value. To
134134
delete a key, supply a null value. Custom claims made with reserved claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`) will be ignored.
135135
Total custom claims size cannot exceed four kilobytes.
136-
- locale: If the needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
136+
- locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
137137
138138
Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
139139

stytch/b2b/api/discovery_organizations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def create(
5959
] = None,
6060
allowed_third_party_connected_apps: Optional[List[str]] = None,
6161
) -> CreateResponse:
62-
"""This endpoint allows you to exchange the `intermediate_session_token` returned when the user successfully completes a authentication flow to create a new
62+
"""This endpoint allows you to exchange the `intermediate_session_token` returned when the user successfully completes a Discovery authentication flow to create a new
6363
[Organization](https://stytch.com/docs/b2b/api/organization-object) and [Member](https://stytch.com/docs/b2b/api/member-object) and log the user in. If the user wants to log into an existing Organization, use the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) instead.
6464
6565
Stytch **requires that users verify their email address** prior to creating a new Organization in order to prevent Account Takeover (ATO) attacks and phishing.
@@ -271,7 +271,7 @@ async def create_async(
271271
] = None,
272272
allowed_third_party_connected_apps: Optional[List[str]] = None,
273273
) -> CreateResponse:
274-
"""This endpoint allows you to exchange the `intermediate_session_token` returned when the user successfully completes a authentication flow to create a new
274+
"""This endpoint allows you to exchange the `intermediate_session_token` returned when the user successfully completes a Discovery authentication flow to create a new
275275
[Organization](https://stytch.com/docs/b2b/api/organization-object) and [Member](https://stytch.com/docs/b2b/api/member-object) and log the user in. If the user wants to log into an existing Organization, use the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) instead.
276276
277277
Stytch **requires that users verify their email address** prior to creating a new Organization in order to prevent Account Takeover (ATO) attacks and phishing.

stytch/b2b/api/impersonation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ def authenticate(
2525
self,
2626
impersonation_token: str,
2727
) -> AuthenticateResponse:
28-
"""Authenticate an impersonation token to impersonate a. This endpoint requires an impersonation token that is not expired or previously used.
28+
"""Authenticate an impersonation token to impersonate a Member. This endpoint requires an impersonation token that is not expired or previously used.
2929
A Stytch session will be created for the impersonated member with a 60 minute duration. Impersonated sessions cannot be extended.
3030
3131
Prior to this step, you can generate an impersonation token by visiting the Stytch Dashboard, viewing a member, and clicking the `Impersonate Member` button.
3232
3333
Fields:
34-
- impersonation_token: The User Impersonation token to authenticate.
34+
- impersonation_token: The Member Impersonation token to authenticate. Expires in 5 minutes by default.
3535
""" # noqa
3636
headers: Dict[str, str] = {}
3737
data: Dict[str, Any] = {
@@ -46,13 +46,13 @@ async def authenticate_async(
4646
self,
4747
impersonation_token: str,
4848
) -> AuthenticateResponse:
49-
"""Authenticate an impersonation token to impersonate a. This endpoint requires an impersonation token that is not expired or previously used.
49+
"""Authenticate an impersonation token to impersonate a Member. This endpoint requires an impersonation token that is not expired or previously used.
5050
A Stytch session will be created for the impersonated member with a 60 minute duration. Impersonated sessions cannot be extended.
5151
5252
Prior to this step, you can generate an impersonation token by visiting the Stytch Dashboard, viewing a member, and clicking the `Impersonate Member` button.
5353
5454
Fields:
55-
- impersonation_token: The User Impersonation token to authenticate.
55+
- impersonation_token: The Member Impersonation token to authenticate. Expires in 5 minutes by default.
5656
""" # noqa
5757
headers: Dict[str, str] = {}
5858
data: Dict[str, Any] = {

stytch/b2b/api/magic_links.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ def authenticate(
4747
locale: Optional[Union[AuthenticateRequestLocale, str]] = None,
4848
intermediate_session_token: Optional[str] = None,
4949
) -> AuthenticateResponse:
50-
"""Authenticate a with a Magic Link. This endpoint requires a Magic Link token that is not expired or previously used. If the Member’s status is `pending` or `invited`, they will be updated to `active`.
50+
"""Authenticate a Member with a Magic Link. This endpoint requires a Magic Link token that is not expired or previously used. If the Member’s status is `pending` or `invited`, they will be updated to `active`.
5151
Provide the `session_duration_minutes` parameter to set the lifetime of the session. If the `session_duration_minutes` parameter is not specified, a Stytch session will be created with a 60 minute duration.
5252
53-
If the Member is required to complete MFA to log in to the, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
53+
If the Member is required to complete MFA to log in to the Organization, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
5454
The `intermediate_session_token` can be passed into the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
5555
or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA step and acquire a full member session.
5656
The `intermediate_session_token` can also be used with the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to join a different Organization or create a new one.
@@ -81,7 +81,7 @@ def authenticate(
8181
`session_duration_minutes`. Claims will be included on the Session object and in the JWT. To update a key in an existing Session, supply a new value. To
8282
delete a key, supply a null value. Custom claims made with reserved claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`) will be ignored.
8383
Total custom claims size cannot exceed four kilobytes.
84-
- locale: If the needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
84+
- locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
8585
8686
Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
8787
@@ -125,10 +125,10 @@ async def authenticate_async(
125125
locale: Optional[AuthenticateRequestLocale] = None,
126126
intermediate_session_token: Optional[str] = None,
127127
) -> AuthenticateResponse:
128-
"""Authenticate a with a Magic Link. This endpoint requires a Magic Link token that is not expired or previously used. If the Member’s status is `pending` or `invited`, they will be updated to `active`.
128+
"""Authenticate a Member with a Magic Link. This endpoint requires a Magic Link token that is not expired or previously used. If the Member’s status is `pending` or `invited`, they will be updated to `active`.
129129
Provide the `session_duration_minutes` parameter to set the lifetime of the session. If the `session_duration_minutes` parameter is not specified, a Stytch session will be created with a 60 minute duration.
130130
131-
If the Member is required to complete MFA to log in to the, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
131+
If the Member is required to complete MFA to log in to the Organization, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
132132
The `intermediate_session_token` can be passed into the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
133133
or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA step and acquire a full member session.
134134
The `intermediate_session_token` can also be used with the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to join a different Organization or create a new one.
@@ -159,7 +159,7 @@ async def authenticate_async(
159159
`session_duration_minutes`. Claims will be included on the Session object and in the JWT. To update a key in an existing Session, supply a new value. To
160160
delete a key, supply a null value. Custom claims made with reserved claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`) will be ignored.
161161
Total custom claims size cannot exceed four kilobytes.
162-
- locale: If the needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
162+
- locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
163163
164164
Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
165165

stytch/b2b/api/magic_links_email.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def invite(
180180
invite_expiration_minutes: Optional[int] = None,
181181
method_options: Optional[InviteRequestOptions] = None,
182182
) -> InviteResponse:
183-
"""Send an invite email to a new to join an. The Member will be created with an `invited` status until they successfully authenticate. Sending invites to `pending` Members will update their status to `invited`. Sending invites to already `active` Members will return an error.
183+
"""Send an invite email to a new Member to join an Organization. The Member will be created with an `invited` status until they successfully authenticate. Sending invites to `pending` Members will update their status to `invited`. Sending invites to already `active` Members will return an error.
184184
185185
The magic link invite will be valid for 1 week.
186186
@@ -257,7 +257,7 @@ async def invite_async(
257257
invite_expiration_minutes: Optional[int] = None,
258258
method_options: Optional[InviteRequestOptions] = None,
259259
) -> InviteResponse:
260-
"""Send an invite email to a new to join an. The Member will be created with an `invited` status until they successfully authenticate. Sending invites to `pending` Members will update their status to `invited`. Sending invites to already `active` Members will return an error.
260+
"""Send an invite email to a new Member to join an Organization. The Member will be created with an `invited` status until they successfully authenticate. Sending invites to `pending` Members will update their status to `invited`. Sending invites to already `active` Members will return an error.
261261
262262
The magic link invite will be valid for 1 week.
263263

0 commit comments

Comments
 (0)