Skip to content

Commit

Permalink
Bump SDK from codegen workflow (#227)
Browse files Browse the repository at this point in the history
Co-authored-by: Stytch Codegen Bot <[email protected]>
  • Loading branch information
ci-stytch and Stytch Codegen Bot authored Jan 3, 2025
1 parent 5fc9476 commit be97337
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 21 deletions.
4 changes: 2 additions & 2 deletions stytch/b2b/api/discovery_organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def list(
will be returned, and any membership can be assumed by calling the [Exchange Session](https://stytch.com/docs/b2b/api/exchange-session) endpoint.
When an Intermediate Session is passed in, all relationship types - `active_member`, `pending_member`, `invited_member`,
and `eligible_to_join_by_email_domain` - will be returned,
`eligible_to_join_by_email_domain`, and `eligible_to_join_by_oauth_tenant` - will be returned,
and any membership can be assumed by calling the [Exchange Intermediate Session](https://stytch.com/docs/b2b/api/exchange-intermediate-session) endpoint.
This endpoint requires either an `intermediate_session_token`, `session_jwt` or `session_token` be included in the request.
Expand Down Expand Up @@ -412,7 +412,7 @@ async def list_async(
will be returned, and any membership can be assumed by calling the [Exchange Session](https://stytch.com/docs/b2b/api/exchange-session) endpoint.
When an Intermediate Session is passed in, all relationship types - `active_member`, `pending_member`, `invited_member`,
and `eligible_to_join_by_email_domain` - will be returned,
`eligible_to_join_by_email_domain`, and `eligible_to_join_by_oauth_tenant` - will be returned,
and any membership can be assumed by calling the [Exchange Intermediate Session](https://stytch.com/docs/b2b/api/exchange-intermediate-session) endpoint.
This endpoint requires either an `intermediate_session_token`, `session_jwt` or `session_token` be included in the request.
Expand Down
2 changes: 1 addition & 1 deletion stytch/b2b/models/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class Membership(pydantic.BaseModel):
"""
Fields:
- type: Either `active_member`, `pending_member`, `invited_member`, or `eligible_to_join_by_email_domain`
- type: Either `active_member`, `pending_member`, `invited_member`, `eligible_to_join_by_email_domain`, or `eligible_to_join_by_oauth_tenant`
- details: An object containing additional metadata about the membership, if available.
- member: The [Member object](https://stytch.com/docs/b2b/api/member-object) if one already exists, or null if one does not.
""" # noqa
Expand Down
3 changes: 1 addition & 2 deletions stytch/b2b/models/magic_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ class AuthenticateResponse(ResponseBase):
Fields:
- member_id: Globally unique UUID that identifies a specific Member.
- method_id: The email or device involved in the authentication.
- reset_sessions: Indicates if all Sessions linked to the Member need to be reset. You should check this field if you aren't using
Stytch's Session product. If you are using Stytch's Session product, we revoke the Member’s other Sessions for you.
- reset_sessions: This field is deprecated.
- organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
- member: The [Member object](https://stytch.com/docs/b2b/api/member-object)
- session_token: A secret token for a given Stytch Session.
Expand Down
2 changes: 1 addition & 1 deletion stytch/b2b/models/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class AuthenticateResponse(ResponseBase):
- member: The [Member object](https://stytch.com/docs/b2b/api/member-object)
- organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
- organization: The [Organization object](https://stytch.com/docs/b2b/api/organization-object).
- reset_sessions: (no documentation yet)
- reset_sessions: This field is deprecated.
- member_authenticated: Indicates whether the Member is fully authenticated. If false, the Member needs to complete an MFA step to log in to the Organization.
- intermediate_session_token: The returned Intermediate Session Token contains an OAuth factor associated with the Member's email address. If this value is non-empty, the member must complete an MFA step to finish logging in to the Organization. The token can be used with 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), or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow and log in to the Organization. It can also be used with the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a specific Organization that allows the factors represented by the intermediate session token; or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization and Member.
- member_session: The [Session object](https://stytch.com/docs/b2b/api/session-object).
Expand Down
2 changes: 1 addition & 1 deletion stytch/b2b/models/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class Organization(pydantic.BaseModel):
class ResultsMetadata(pydantic.BaseModel):
"""
Fields:
- total: The total number of results returned by your search query.
- total: The total number of results returned by your search query. If totals have been disabled for your Stytch Workspace to improve search performance, the value will always be -1.
- next_cursor: The `next_cursor` string is returned when your search result contains more than one page of results. This value is passed into your next search call in the `cursor` field.
""" # noqa

Expand Down
15 changes: 13 additions & 2 deletions stytch/b2b/models/passwords_discovery_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,19 @@ class ResetResponse(ResponseBase):
"""Response type for `Email.reset`.
Fields:
- intermediate_session_token: The returned Intermediate Session Token contains a password factor associated with the Member. If this value is non-empty, the member must complete an MFA step to finish logging in to the Organization. The token can be used with 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), or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow and log in to the Organization. Password factors are not transferable between Organizations, so the intermediate session token is not valid for use with discovery endpoints.
- email_address: (no documentation yet)
- discovered_organizations: (no documentation yet)
- email_address: The email address.
- discovered_organizations: An array of `discovered_organization` objects tied to the `intermediate_session_token`, `session_token`, or `session_jwt`. See the [Discovered Organization Object](https://stytch.com/docs/b2b/api/discovered-organization-object) for complete details.
Note that Organizations will only appear here under any of the following conditions:
1. The end user is already a Member of the Organization.
2. The end user is invited to the Organization.
3. The end user can join the Organization because:
a) The Organization allows JIT provisioning.
b) The Organizations' allowed domains list contains the Member's email domain.
c) The Organization has at least one other Member with a verified email address with the same domain as the end user (to prevent phishing attacks).
""" # noqa

intermediate_session_token: str
Expand Down
2 changes: 1 addition & 1 deletion stytch/b2b/models/scim_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class GetGroupsResponse(ResponseBase):
class GetResponse(ResponseBase):
"""Response type for `Connection.get`.
Fields:
- connection: (no documentation yet)
- connection: A [SCIM Connection](https://stytch.com/docs/b2b/api/scim-connection-object) connection belonging to the organization (currently limited to one).
""" # noqa

connection: Optional[SCIMConnection] = None
Expand Down
3 changes: 1 addition & 2 deletions stytch/b2b/models/sso.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,7 @@ class AuthenticateResponse(ResponseBase):
- member: The [Member object](https://stytch.com/docs/b2b/api/member-object)
- session_token: A secret token for a given Stytch Session.
- session_jwt: The JSON Web Token (JWT) for a given Stytch Session.
- reset_session: Indicates if all Sessions linked to the Member need to be reset. You should check this field if you aren't using
Stytch's Session product. If you are using Stytch's Session product, we revoke the Member’s other Sessions for you.
- reset_session: This field is deprecated.
- organization: The [Organization object](https://stytch.com/docs/b2b/api/organization-object).
- intermediate_session_token: The returned Intermediate Session Token contains an SSO factor associated with the Member. If this value is non-empty, the member must complete an MFA step to finish logging in to the Organization. The token can be used with 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), or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow and log in to the Organization. SSO factors are not transferable between Organizations, so the intermediate session token is not valid for use with discovery endpoints.
- member_authenticated: Indicates whether the Member is fully authenticated. If false, the Member needs to complete an MFA step to log in to the Organization.
Expand Down
4 changes: 2 additions & 2 deletions stytch/consumer/api/magic_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def authenticate(
The redirect URL will look like `https://example.com/authenticate?stytch_token_type=magic_links&token=rM_kw42CWBhsHLF62V75jELMbvJ87njMe3tFVj7Qupu7`
In the redirect URL, the `stytch_token_type` will be `magic_link`. See [here](https://stytch.com/docs/guides/dashboard/redirect-urls) for more detail.
In the redirect URL, the `stytch_token_type` will be `magic_link`. See [here](/workspace-management/redirect-urls) for more detail.
- attributes: Provided attributes help with fraud detection.
- options: Specify optional security settings.
- session_token: The `session_token` associated with a User's existing Session.
Expand Down Expand Up @@ -112,7 +112,7 @@ async def authenticate_async(
The redirect URL will look like `https://example.com/authenticate?stytch_token_type=magic_links&token=rM_kw42CWBhsHLF62V75jELMbvJ87njMe3tFVj7Qupu7`
In the redirect URL, the `stytch_token_type` will be `magic_link`. See [here](https://stytch.com/docs/guides/dashboard/redirect-urls) for more detail.
In the redirect URL, the `stytch_token_type` will be `magic_link`. See [here](/workspace-management/redirect-urls) for more detail.
- attributes: Provided attributes help with fraud detection.
- options: Specify optional security settings.
- session_token: The `session_token` associated with a User's existing Session.
Expand Down
4 changes: 2 additions & 2 deletions stytch/consumer/api/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def authenticate(
The redirect URL will look like `https://example.com/authenticate?stytch_token_type=oauth&token=rM_kw42CWBhsHLF62V75jELMbvJ87njMe3tFVj7Qupu7`
In the redirect URL, the `stytch_token_type` will be `oauth`. See [here](https://stytch.com/docs/guides/dashboard/redirect-urls) for more detail.
In the redirect URL, the `stytch_token_type` will be `oauth`. See [here](/workspace-management/redirect-urls) for more detail.
- session_token: Reuse an existing session instead of creating a new one. If you provide us with a `session_token`, then we'll update the session represented by this session token with this OAuth factor. If this `session_token` belongs to a different user than the OAuth token, the session_jwt will be ignored. This endpoint will error if both `session_token` and `session_jwt` are provided.
- session_duration_minutes: Set the session lifetime to be this many minutes from now. This will start a new session if one doesn't already exist,
returning both an opaque `session_token` and `session_jwt` for this session. Remember that the `session_jwt` will have a fixed lifetime of
Expand Down Expand Up @@ -157,7 +157,7 @@ async def authenticate_async(
The redirect URL will look like `https://example.com/authenticate?stytch_token_type=oauth&token=rM_kw42CWBhsHLF62V75jELMbvJ87njMe3tFVj7Qupu7`
In the redirect URL, the `stytch_token_type` will be `oauth`. See [here](https://stytch.com/docs/guides/dashboard/redirect-urls) for more detail.
In the redirect URL, the `stytch_token_type` will be `oauth`. See [here](/workspace-management/redirect-urls) for more detail.
- session_token: Reuse an existing session instead of creating a new one. If you provide us with a `session_token`, then we'll update the session represented by this session token with this OAuth factor. If this `session_token` belongs to a different user than the OAuth token, the session_jwt will be ignored. This endpoint will error if both `session_token` and `session_jwt` are provided.
- session_duration_minutes: Set the session lifetime to be this many minutes from now. This will start a new session if one doesn't already exist,
returning both an opaque `session_token` and `session_jwt` for this session. Remember that the `session_jwt` will have a fixed lifetime of
Expand Down
4 changes: 2 additions & 2 deletions stytch/consumer/api/passwords_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def reset(
In the redirect URL, the `stytch_token_type` will be `login` or `reset_password`.
See examples and read more about redirect URLs [here](https://stytch.com/docs/guides/dashboard/redirect-urls).
See examples and read more about redirect URLs [here](/workspace-management/redirect-urls).
- password: The password for the user. Any UTF8 character is allowed, e.g. spaces, emojis, non-English characers, etc.
- session_token: The `session_token` associated with a User's existing Session.
- session_duration_minutes: Set the session lifetime to be this many minutes from now. This will start a new session if one doesn't already exist,
Expand Down Expand Up @@ -245,7 +245,7 @@ async def reset_async(
In the redirect URL, the `stytch_token_type` will be `login` or `reset_password`.
See examples and read more about redirect URLs [here](https://stytch.com/docs/guides/dashboard/redirect-urls).
See examples and read more about redirect URLs [here](/workspace-management/redirect-urls).
- password: The password for the user. Any UTF8 character is allowed, e.g. spaces, emojis, non-English characers, etc.
- session_token: The `session_token` associated with a User's existing Session.
- session_duration_minutes: Set the session lifetime to be this many minutes from now. This will start a new session if one doesn't already exist,
Expand Down
2 changes: 1 addition & 1 deletion stytch/consumer/models/m2m.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class M2MSearchQuery(pydantic.BaseModel):
class ResultsMetadata(pydantic.BaseModel):
"""
Fields:
- total: The total number of results returned by your search query.
- total: The total number of results returned by your search query. If totals have been disabled for your Stytch Workspace to improve search performance, the value will always be -1.
- next_cursor: The `next_cursor` string is returned when your search result contains more than one page of results. This value is passed into your next search call in the `cursor` field.
""" # noqa

Expand Down
16 changes: 16 additions & 0 deletions stytch/consumer/models/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class AuthenticationFactorDeliveryMethod(str, enum.Enum):
OAUTH_EXCHANGE_SLACK = "oauth_exchange_slack"
OAUTH_EXCHANGE_HUBSPOT = "oauth_exchange_hubspot"
OAUTH_EXCHANGE_GITHUB = "oauth_exchange_github"
OAUTH_EXCHANGE_GOOGLE = "oauth_exchange_google"
IMPERSONATION = "impersonation"


class AuthenticationFactorType(str, enum.Enum):
Expand All @@ -73,6 +75,7 @@ class AuthenticationFactorType(str, enum.Enum):
IMPORTED = "imported"
RECOVERY_CODES = "recovery_codes"
EMAIL_OTP = "email_otp"
IMPERSONATED = "impersonated"


class AmazonOAuthFactor(pydantic.BaseModel):
Expand Down Expand Up @@ -167,6 +170,10 @@ class GithubOAuthFactor(pydantic.BaseModel):
email_id: Optional[str] = None


class GoogleOAuthExchangeFactor(pydantic.BaseModel):
email_id: str


class GoogleOAuthFactor(pydantic.BaseModel):
"""
Fields:
Expand All @@ -190,6 +197,11 @@ class HubspotOAuthFactor(pydantic.BaseModel):
email_id: Optional[str] = None


class ImpersonatedFactor(pydantic.BaseModel):
impersonator_id: str
impersonator_email_address: str


class InstagramOAuthFactor(pydantic.BaseModel):
id: str
provider_subject: str
Expand Down Expand Up @@ -395,6 +407,8 @@ class AuthenticationFactor(pydantic.BaseModel):
- slack_oauth_exchange_factor: (no documentation yet)
- hubspot_oauth_exchange_factor: (no documentation yet)
- github_oauth_exchange_factor: (no documentation yet)
- google_oauth_exchange_factor: (no documentation yet)
- impersonated_factor: (no documentation yet)
""" # noqa

type: AuthenticationFactorType
Expand Down Expand Up @@ -439,6 +453,8 @@ class AuthenticationFactor(pydantic.BaseModel):
slack_oauth_exchange_factor: Optional[SlackOAuthExchangeFactor] = None
hubspot_oauth_exchange_factor: Optional[HubspotOAuthExchangeFactor] = None
github_oauth_exchange_factor: Optional[GithubOAuthExchangeFactor] = None
google_oauth_exchange_factor: Optional[GoogleOAuthExchangeFactor] = None
impersonated_factor: Optional[ImpersonatedFactor] = None


class Session(pydantic.BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion stytch/consumer/models/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class PhoneNumber(pydantic.BaseModel):
class ResultsMetadata(pydantic.BaseModel):
"""
Fields:
- total: The total number of results returned by your search query.
- total: The total number of results returned by your search query. If totals have been disabled for your Stytch Workspace to improve search performance, the value will always be -1.
- next_cursor: The `next_cursor` string is returned when your search result contains more than one page of results. This value is passed into your next search call in the `cursor` field.
""" # noqa

Expand Down
2 changes: 1 addition & 1 deletion stytch/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "11.10.0"
__version__ = "11.11.0"

0 comments on commit be97337

Please sign in to comment.