Skip to content

Commit 2cf88a1

Browse files
authored
chore(sdk): add OrgInvitationResponse.token field (robosystems #1166) (#189)
## Summary Regenerates `OrgInvitationResponse` to include the new optional `token` field, added upstream in robosystems [#1166](RoboFinSystems/robosystems#1166). ## Change - Additive: a new optional field `token: None | str | Unset = UNSET` on `OrgInvitationResponse`. No other model changed; the diff is scoped to this one field. - The field is documented (test-support only): the API populates it **only** when `AUTH_INVITE_TOKEN_IN_RESPONSE` is enabled in a non-production environment, and it is **always null in production**. It exists so automated authorization tests can complete the invite → register flow without email interception. ## Contract - **Generated-tier, additive → rides a client minor.** `OrgInvitationResponse` is an OpenAPI-generated model, not a facade and not on the integration-template emit path; an added optional field breaks nothing. Not a stable-tier change, no deprecation, no release notes required. - No version bump (user-owned via create-release). ## Sequencing The field originates in robosystems #1166, which is **open, not yet merged/deployed** (prod on API 1.8.3). Because the field is optional, this client is forward-compatible against the current API — the field is simply always absent until #1166 lands. If #1166's review changes the field (e.g. excludes it from the schema), re-regenerate before publishing.
2 parents 071fdb9 + 8ad508e commit 2cf88a1

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

‎robosystems_client/models/org_invitation_response.py‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from attrs import field as _attrs_field
99

1010
from ..models.org_role import OrgRole
11+
from ..types import UNSET, Unset
1112

1213
T = TypeVar("T", bound="OrgInvitationResponse")
1314

@@ -27,6 +28,9 @@ class OrgInvitationResponse:
2728
created_at (datetime.datetime):
2829
expires_at (datetime.datetime):
2930
is_expired (bool):
31+
token (None | str | Unset): Test-support only: the raw invite token. Populated ONLY when
32+
AUTH_INVITE_TOKEN_IN_RESPONSE is enabled in a non-production environment; always null in production. Lets
33+
automated authorization tests complete the invite -> register flow without email interception.
3034
"""
3135

3236
id: str
@@ -39,6 +43,7 @@ class OrgInvitationResponse:
3943
created_at: datetime.datetime
4044
expires_at: datetime.datetime
4145
is_expired: bool
46+
token: None | str | Unset = UNSET
4247
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
4348

4449
def to_dict(self) -> dict[str, Any]:
@@ -63,6 +68,12 @@ def to_dict(self) -> dict[str, Any]:
6368

6469
is_expired = self.is_expired
6570

71+
token: None | str | Unset
72+
if isinstance(self.token, Unset):
73+
token = UNSET
74+
else:
75+
token = self.token
76+
6677
field_dict: dict[str, Any] = {}
6778
field_dict.update(self.additional_properties)
6879
field_dict.update(
@@ -79,6 +90,8 @@ def to_dict(self) -> dict[str, Any]:
7990
"is_expired": is_expired,
8091
}
8192
)
93+
if token is not UNSET:
94+
field_dict["token"] = token
8295

8396
return field_dict
8497

@@ -110,6 +123,15 @@ def _parse_invited_by_name(data: object) -> None | str:
110123

111124
is_expired = d.pop("is_expired")
112125

126+
def _parse_token(data: object) -> None | str | Unset:
127+
if data is None:
128+
return data
129+
if isinstance(data, Unset):
130+
return data
131+
return cast(None | str | Unset, data)
132+
133+
token = _parse_token(d.pop("token", UNSET))
134+
113135
org_invitation_response = cls(
114136
id=id,
115137
org_id=org_id,
@@ -121,6 +143,7 @@ def _parse_invited_by_name(data: object) -> None | str:
121143
created_at=created_at,
122144
expires_at=expires_at,
123145
is_expired=is_expired,
146+
token=token,
124147
)
125148

126149
org_invitation_response.additional_properties = d

0 commit comments

Comments
 (0)