Skip to content

Commit

Permalink
Change chain_id to string (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-stytch authored Aug 13, 2024
1 parent b1c0bc5 commit 87f3e14
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 11 deletions.
8 changes: 4 additions & 4 deletions stytch/b2b/api/scim_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def update(
- connection_id: The ID of the SCIM connection.
- display_name: A human-readable display name for the connection.
- identity_provider: (no documentation yet)
- scim_group_implicit_role_assignments: An array of SCIM group implicit role assignments. Each object in the array must contain a `group` and a `role_id`.
- scim_group_implicit_role_assignments: An array of SCIM group implicit role assignments. Each object in the array must contain a `group_id` and a `role_id`.
""" # noqa
headers: Dict[str, str] = {}
if method_options is not None:
Expand Down Expand Up @@ -102,7 +102,7 @@ async def update_async(
- connection_id: The ID of the SCIM connection.
- display_name: A human-readable display name for the connection.
- identity_provider: (no documentation yet)
- scim_group_implicit_role_assignments: An array of SCIM group implicit role assignments. Each object in the array must contain a `group` and a `role_id`.
- scim_group_implicit_role_assignments: An array of SCIM group implicit role assignments. Each object in the array must contain a `group_id` and a `role_id`.
""" # noqa
headers: Dict[str, str] = {}
if method_options is not None:
Expand Down Expand Up @@ -472,7 +472,7 @@ def get(
organization_id: str,
method_options: Optional[GetRequestOptions] = None,
) -> GetResponse:
"""Get SCIM Connections.
"""Get SCIM Connection.
Fields:
- 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.
Expand All @@ -493,7 +493,7 @@ async def get_async(
organization_id: str,
method_options: Optional[GetRequestOptions] = None,
) -> GetResponse:
"""Get SCIM Connections.
"""Get SCIM Connection.
Fields:
- 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.
Expand Down
9 changes: 9 additions & 0 deletions stytch/b2b/models/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ class MemberRoleSource(pydantic.BaseModel):
SAML group implicit role assignments can be updated by passing in the `saml_group_implicit_role_assignments`
argument to the [Update SAML connection](https://stytch.com/docs/b2b/api/update-saml-connection) endpoint.
`scim_connection_group` – an implicit Role granted by the Member's SCIM connection and group. If the Member has
a SCIM Member registration with the given connection, and belongs to a specific group within the IdP, this role assignment will appear in the list.
SCIM group implicit role assignments can be updated by passing in the `scim_group_implicit_role_assignments`
argument to the [Update SCIM connection](https://stytch.com/docs/b2b/api/update-scim-connection) endpoint.
- details: An object containing additional metadata about the source assignment. The fields will vary depending
on the role assignment type as follows:
Expand All @@ -132,6 +138,9 @@ class MemberRoleSource(pydantic.BaseModel):
`sso_connection_group` – will contain the `connection_id` of the SAML connection and the name of the `group`
that granted the assignment.
`scim_connection_group` – will contain the `connection_id` of the SAML connection and the `group_id`
that granted the assignment.
""" # noqa

type: str
Expand Down
8 changes: 7 additions & 1 deletion stytch/b2b/models/scim.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ class Group(pydantic.BaseModel):
display: str


class IMs(pydantic.BaseModel):
value: str
type: str


class Manager(pydantic.BaseModel):
value: str
ref: str
Expand Down Expand Up @@ -81,6 +86,7 @@ class SCIMAttributes(pydantic.BaseModel):
emails: List[Email]
phone_numbers: List[PhoneNumber]
addresses: List[Address]
ims: List[IMs]
name: Optional[Name] = None
enterprise_extension: Optional[EnterpriseExtension] = None

Expand All @@ -104,7 +110,7 @@ class SCIMGroupImplicitRoleAssignments(pydantic.BaseModel):
"""
Fields:
- role_id: The ID of the role.
- group_id: (no documentation yet)
- group_id: The ID of the group.
- group_name: (no documentation yet)
""" # noqa

Expand Down
10 changes: 5 additions & 5 deletions stytch/consumer/models/crypto_wallets.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ class SIWEParams(pydantic.BaseModel):
- domain: Only required if `siwe_params` is passed. The domain that is requesting the crypto wallet signature. Must be an RFC 3986 authority.
- uri: Only required if `siwe_params` is passed. An RFC 3986 URI referring to the resource that is the subject of the signing.
- resources: A list of information or references to information the user wishes to have resolved as part of authentication. Every resource must be an RFC 3986 URI.
- chain_id: The EIP-155 Chain ID to which the session is bound. Defaults to 1.
- statement: A human-readable ASCII assertion that the user will sign.
- chain_id: The EIP-155 Chain ID to which the session is bound. Defaults to 1. Must be the string representation of an integer between 1 and 9,223,372,036,854,775,771, inclusive.
- statement: A human-readable ASCII assertion that the user will sign. The statement may only include reserved, unreserved, or space characters according to RFC 3986 definitions, and must not contain other forms of whitespace such as newlines, tabs, and carriage returns.
- issued_at: The time when the message was generated. Defaults to the current time. All timestamps in our API conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`.
- not_before: The time when the signed authentication message will become valid. Defaults to the current time. All timestamps in our API conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`.
- message_request_id: A system-specific identifier that may be used to uniquely refer to the sign-in request.
- message_request_id: A system-specific identifier that may be used to uniquely refer to the sign-in request. The `message_request_id` must be a valid pchar according to RFC 3986 definitions.
""" # noqa

domain: str
uri: str
resources: List[str]
chain_id: Optional[int] = None
chain_id: Optional[str] = None
statement: Optional[str] = None
issued_at: Optional[datetime.datetime] = None
not_before: Optional[datetime.datetime] = None
Expand Down Expand Up @@ -65,7 +65,7 @@ class SIWEParamsResponse(ResponseBase):

domain: str
uri: str
chain_id: int
chain_id: str
resources: List[str]
issued_at: Optional[datetime.datetime] = None
message_request_id: Optional[str] = None
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.2.0"
__version__ = "11.3.0"

0 comments on commit 87f3e14

Please sign in to comment.