Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions stytch/b2b/models/discovery_intermediate_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from __future__ import annotations

import datetime
import enum
from typing import Optional

Expand All @@ -25,6 +26,14 @@ class ExchangeRequestLocale(str, enum.Enum):
DEDE = "de-DE"
ZHHANS = "zh-Hans"
CAES = "ca-ES"
JA = "ja"
RU = "ru"
NL = "nl"
PL = "pl"
TR = "tr"
FA = "fa"
VI = "vi"
CS = "cs"


class ExchangeResponse(ResponseBase):
Expand All @@ -41,6 +50,7 @@ class ExchangeResponse(ResponseBase):
- mfa_required: Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
- primary_required: Information about the primary authentication requirements of the Organization.
- member_device: If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

member_id: str
Expand All @@ -54,3 +64,4 @@ class ExchangeResponse(ResponseBase):
mfa_required: Optional[MfaRequired] = None
primary_required: Optional[PrimaryRequired] = None
member_device: Optional[DeviceInfo] = None
intermediate_session_token_expires_at: Optional[datetime.datetime] = None
3 changes: 3 additions & 0 deletions stytch/b2b/models/discovery_organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from __future__ import annotations

import datetime
import enum
from typing import List, Optional

Expand Down Expand Up @@ -67,6 +68,7 @@ class CreateResponse(ResponseBase):
- mfa_required: Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
- primary_required: Information about the primary authentication requirements of the Organization.
- member_device: If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

member_id: str
Expand All @@ -80,3 +82,4 @@ class CreateResponse(ResponseBase):
mfa_required: Optional[MfaRequired] = None
primary_required: Optional[PrimaryRequired] = None
member_device: Optional[DeviceInfo] = None
intermediate_session_token_expires_at: Optional[datetime.datetime] = None
3 changes: 3 additions & 0 deletions stytch/b2b/models/impersonation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from __future__ import annotations

import datetime
from typing import Optional

from stytch.b2b.models.mfa import MfaRequired
Expand All @@ -27,6 +28,7 @@ class AuthenticateResponse(ResponseBase):
- member_authenticated: The member will always be fully authenticated if an impersonation token is successfully authenticated.
- member_session: The [Session object](https://stytch.com/docs/b2b/api/session-object) for the impersonated Member.
- mfa_required: MFA will not be required when authenticating impersonation tokens.
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

member_id: str
Expand All @@ -39,3 +41,4 @@ class AuthenticateResponse(ResponseBase):
member_authenticated: bool
member_session: Optional[MemberSession] = None
mfa_required: Optional[MfaRequired] = None
intermediate_session_token_expires_at: Optional[datetime.datetime] = None
3 changes: 3 additions & 0 deletions stytch/b2b/models/magic_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from __future__ import annotations

import datetime
import enum
from typing import Optional

Expand Down Expand Up @@ -40,6 +41,7 @@ class AuthenticateResponse(ResponseBase):
- mfa_required: Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
- primary_required: (no documentation yet)
- member_device: If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

member_id: str
Expand All @@ -56,3 +58,4 @@ class AuthenticateResponse(ResponseBase):
mfa_required: Optional[MfaRequired] = None
primary_required: Optional[PrimaryRequired] = None
member_device: Optional[DeviceInfo] = None
intermediate_session_token_expires_at: Optional[datetime.datetime] = None
5 changes: 4 additions & 1 deletion stytch/b2b/models/magic_links_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

from __future__ import annotations

from typing import List
import datetime
from typing import List, Optional

from stytch.b2b.models.discovery import DiscoveredOrganization
from stytch.core.response_base import ResponseBase
Expand All @@ -29,8 +30,10 @@ class AuthenticateResponse(ResponseBase):
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).
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

intermediate_session_token: str
email_address: str
discovered_organizations: List[DiscoveredOrganization]
intermediate_session_token_expires_at: Optional[datetime.datetime] = None
10 changes: 10 additions & 0 deletions stytch/b2b/models/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ class AuthenticateRequestLocale(str, enum.Enum):
DEDE = "de-DE"
ZHHANS = "zh-Hans"
CAES = "ca-ES"
JA = "ja"
RU = "ru"
NL = "nl"
PL = "pl"
TR = "tr"
FA = "fa"
VI = "vi"
CS = "cs"


class ProviderValues(pydantic.BaseModel):
Expand Down Expand Up @@ -68,6 +76,7 @@ class AuthenticateResponse(ResponseBase):
- mfa_required: Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
- primary_required: Information about the primary authentication requirements of the Organization.
- member_device: If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

member_id: str
Expand All @@ -86,3 +95,4 @@ class AuthenticateResponse(ResponseBase):
mfa_required: Optional[MfaRequired] = None
primary_required: Optional[PrimaryRequired] = None
member_device: Optional[DeviceInfo] = None
intermediate_session_token_expires_at: Optional[datetime.datetime] = None
5 changes: 4 additions & 1 deletion stytch/b2b/models/oauth_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

from __future__ import annotations

from typing import List
import datetime
from typing import List, Optional

from stytch.b2b.models.discovery import DiscoveredOrganization
from stytch.core.response_base import ResponseBase
Expand All @@ -33,6 +34,7 @@ class AuthenticateResponse(ResponseBase):
- provider_tenant_id: The tenant ID returned by the OAuth provider. This is typically used to identify an organization or group within the provider's domain. For example, in HubSpot this is a Hub ID, in Slack this is the Workspace ID, and in GitHub this is an organization ID. This field will only be populated if exactly one tenant ID is returned from a successful OAuth authentication and developers should prefer `provider_tenant_ids` over this since it accounts for the possibility of an OAuth provider yielding multiple tenant IDs.
- provider_tenant_ids: All tenant IDs returned by the OAuth provider. These is typically used to identify organizations or groups within the provider's domain. For example, in HubSpot this is a Hub ID, in Slack this is the Workspace ID, and in GitHub this is an organization ID. Some OAuth providers do not return tenant IDs, some providers are guaranteed to return one, and some may return multiple. This field will always be populated if at least one tenant ID was returned from the OAuth provider and developers should prefer this field over `provider_tenant_id`.
- full_name: The full name of the authenticated end user, if available.
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

intermediate_session_token: str
Expand All @@ -42,3 +44,4 @@ class AuthenticateResponse(ResponseBase):
provider_tenant_id: str
provider_tenant_ids: List[str]
full_name: str
intermediate_session_token_expires_at: Optional[datetime.datetime] = None
3 changes: 3 additions & 0 deletions stytch/b2b/models/otp_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from __future__ import annotations

import datetime
import enum
from typing import Optional

Expand Down Expand Up @@ -46,6 +47,7 @@ class AuthenticateResponse(ResponseBase):
- mfa_required: Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
- primary_required: (no documentation yet)
- member_device: If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

member_id: str
Expand All @@ -61,6 +63,7 @@ class AuthenticateResponse(ResponseBase):
mfa_required: Optional[MfaRequired] = None
primary_required: Optional[PrimaryRequired] = None
member_device: Optional[DeviceInfo] = None
intermediate_session_token_expires_at: Optional[datetime.datetime] = None


class LoginOrSignupResponse(ResponseBase):
Expand Down
5 changes: 4 additions & 1 deletion stytch/b2b/models/otp_email_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

from __future__ import annotations

import datetime
import enum
from typing import List
from typing import List, Optional

from stytch.b2b.models.discovery import DiscoveredOrganization
from stytch.core.response_base import ResponseBase
Expand Down Expand Up @@ -37,11 +38,13 @@ class AuthenticateResponse(ResponseBase):
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).
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

intermediate_session_token: str
email_address: str
discovered_organizations: List[DiscoveredOrganization]
intermediate_session_token_expires_at: Optional[datetime.datetime] = None


class SendResponse(ResponseBase):
Expand Down
8 changes: 8 additions & 0 deletions stytch/b2b/models/otp_sms.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ class SendRequestLocale(str, enum.Enum):
DEDE = "de-DE"
ZHHANS = "zh-Hans"
CAES = "ca-ES"
JA = "ja"
RU = "ru"
NL = "nl"
PL = "pl"
TR = "tr"
FA = "fa"
VI = "vi"
CS = "cs"


class AuthenticateResponse(ResponseBase):
Expand Down
3 changes: 3 additions & 0 deletions stytch/b2b/models/passwords.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from __future__ import annotations

import datetime
import enum
from typing import List, Optional

Expand Down Expand Up @@ -84,6 +85,7 @@ class AuthenticateResponse(ResponseBase):
- mfa_required: Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
- primary_required: Information about the primary authentication requirements of the Organization.
- member_device: If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

member_id: str
Expand All @@ -98,6 +100,7 @@ class AuthenticateResponse(ResponseBase):
mfa_required: Optional[MfaRequired] = None
primary_required: Optional[PrimaryRequired] = None
member_device: Optional[DeviceInfo] = None
intermediate_session_token_expires_at: Optional[datetime.datetime] = None


class MigrateResponse(ResponseBase):
Expand Down
5 changes: 4 additions & 1 deletion stytch/b2b/models/passwords_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

from __future__ import annotations

from typing import List
import datetime
from typing import List, Optional

from stytch.b2b.models.discovery import DiscoveredOrganization
from stytch.core.response_base import ResponseBase
Expand All @@ -29,8 +30,10 @@ class AuthenticateResponse(ResponseBase):
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).
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

email_address: str
intermediate_session_token: str
discovered_organizations: List[DiscoveredOrganization]
intermediate_session_token_expires_at: Optional[datetime.datetime] = None
5 changes: 4 additions & 1 deletion stytch/b2b/models/passwords_discovery_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

from __future__ import annotations

from typing import List
import datetime
from typing import List, Optional

from stytch.b2b.models.discovery import DiscoveredOrganization
from stytch.core.response_base import ResponseBase
Expand All @@ -29,11 +30,13 @@ class ResetResponse(ResponseBase):
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).
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

intermediate_session_token: str
email_address: str
discovered_organizations: List[DiscoveredOrganization]
intermediate_session_token_expires_at: Optional[datetime.datetime] = None


class ResetStartResponse(ResponseBase):
Expand Down
3 changes: 3 additions & 0 deletions stytch/b2b/models/passwords_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from __future__ import annotations

import datetime
import enum
from typing import Dict, Optional

Expand Down Expand Up @@ -78,6 +79,7 @@ class ResetResponse(ResponseBase):
- mfa_required: Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
- primary_required: Information about the primary authentication requirements of the Organization.
- member_device: If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

member_id: str
Expand All @@ -93,6 +95,7 @@ class ResetResponse(ResponseBase):
mfa_required: Optional[MfaRequired] = None
primary_required: Optional[PrimaryRequired] = None
member_device: Optional[DeviceInfo] = None
intermediate_session_token_expires_at: Optional[datetime.datetime] = None


class ResetStartResponse(ResponseBase):
Expand Down
3 changes: 3 additions & 0 deletions stytch/b2b/models/passwords_existing_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from __future__ import annotations

import datetime
import enum
from typing import Optional

Expand Down Expand Up @@ -37,6 +38,7 @@ class ResetResponse(ResponseBase):
- mfa_required: Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
- primary_required: Information about the primary authentication requirements of the Organization.
- member_device: If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

member_id: str
Expand All @@ -50,3 +52,4 @@ class ResetResponse(ResponseBase):
mfa_required: Optional[MfaRequired] = None
primary_required: Optional[PrimaryRequired] = None
member_device: Optional[DeviceInfo] = None
intermediate_session_token_expires_at: Optional[datetime.datetime] = None
3 changes: 3 additions & 0 deletions stytch/b2b/models/passwords_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from __future__ import annotations

import datetime
import enum
from typing import Optional

Expand Down Expand Up @@ -36,6 +37,7 @@ class ResetResponse(ResponseBase):
- member_session: The [Session object](https://stytch.com/docs/b2b/api/session-object).
- mfa_required: Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
- member_device: If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
- intermediate_session_token_expires_at: (no documentation yet)
""" # noqa

member_id: str
Expand All @@ -48,3 +50,4 @@ class ResetResponse(ResponseBase):
member_session: Optional[MemberSession] = None
mfa_required: Optional[MfaRequired] = None
member_device: Optional[DeviceInfo] = None
intermediate_session_token_expires_at: Optional[datetime.datetime] = None
Loading
Loading