|
121 | 121 | from .webhooks._resource import Webhooks, AsyncWebhooks |
122 | 122 | from .widgets._resource import Widgets, AsyncWidgets |
123 | 123 | from .audit_logs._resource import AuditLogs, AsyncAuditLogs |
| 124 | +from .session import AsyncSession, Session |
124 | 125 |
|
125 | 126 | try: |
126 | 127 | from importlib.metadata import version as _pkg_version |
@@ -223,6 +224,15 @@ def data_providers(self) -> UserManagementDataProviders: |
223 | 224 | def multi_factor_authentication(self) -> UserManagementMultiFactorAuthentication: |
224 | 225 | return UserManagementMultiFactorAuthentication(self._client) |
225 | 226 |
|
| 227 | + def load_sealed_session( |
| 228 | + self, *, sealed_session: str, cookie_password: str |
| 229 | + ) -> Session: |
| 230 | + return Session( |
| 231 | + client=self._client, |
| 232 | + session_data=sealed_session, |
| 233 | + cookie_password=cookie_password, |
| 234 | + ) |
| 235 | + |
226 | 236 |
|
227 | 237 | class UserManagementUsersNamespace(object): |
228 | 238 | """UserManagementUsers resources.""" |
@@ -328,6 +338,15 @@ def multi_factor_authentication( |
328 | 338 | ) -> AsyncUserManagementMultiFactorAuthentication: |
329 | 339 | return AsyncUserManagementMultiFactorAuthentication(self._client) |
330 | 340 |
|
| 341 | + def load_sealed_session( |
| 342 | + self, *, sealed_session: str, cookie_password: str |
| 343 | + ) -> AsyncSession: |
| 344 | + return AsyncSession( |
| 345 | + client=self._client, |
| 346 | + session_data=sealed_session, |
| 347 | + cookie_password=cookie_password, |
| 348 | + ) |
| 349 | + |
331 | 350 |
|
332 | 351 | class AsyncUserManagementUsersNamespace(object): |
333 | 352 | """UserManagementUsers resources (async).""" |
@@ -1086,3 +1105,8 @@ async def _fetch(*, after: Optional[str] = None) -> AsyncPage[D]: |
1086 | 1105 | ) |
1087 | 1106 |
|
1088 | 1107 | return AsyncPage(data=items, list_metadata=list_metadata, _fetch_page=_fetch) |
| 1108 | + |
| 1109 | + |
| 1110 | +# Top-level client aliases retained for SDK ergonomics and internal typing |
| 1111 | +WorkOS = WorkOSClient |
| 1112 | +AsyncWorkOS = AsyncWorkOSClient |
0 commit comments