workos 5.36.0__py3-none-any.whl → 5.37.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- workos/__about__.py +1 -1
- workos/user_management.py +86 -0
- {workos-5.36.0.dist-info → workos-5.37.0.dist-info}/METADATA +1 -1
- {workos-5.36.0.dist-info → workos-5.37.0.dist-info}/RECORD +7 -7
- {workos-5.36.0.dist-info → workos-5.37.0.dist-info}/LICENSE +0 -0
- {workos-5.36.0.dist-info → workos-5.37.0.dist-info}/WHEEL +0 -0
- {workos-5.36.0.dist-info → workos-5.37.0.dist-info}/top_level.txt +0 -0
workos/__about__.py
CHANGED
workos/user_management.py
CHANGED
|
@@ -2,6 +2,8 @@ from typing import Awaitable, Optional, Protocol, Sequence, Type, Union, cast
|
|
|
2
2
|
from urllib.parse import urlencode
|
|
3
3
|
from workos._client_configuration import ClientConfiguration
|
|
4
4
|
from workos.session import AsyncSession, Session
|
|
5
|
+
from workos.types.feature_flags import FeatureFlag
|
|
6
|
+
from workos.types.feature_flags.list_filters import FeatureFlagListFilters
|
|
5
7
|
from workos.types.list_resource import (
|
|
6
8
|
ListArgs,
|
|
7
9
|
ListMetadata,
|
|
@@ -97,6 +99,7 @@ INVITATION_REVOKE_PATH = "user_management/invitations/{0}/revoke"
|
|
|
97
99
|
INVITATION_RESEND_PATH = "user_management/invitations/{0}/resend"
|
|
98
100
|
PASSWORD_RESET_PATH = "user_management/password_reset"
|
|
99
101
|
PASSWORD_RESET_DETAIL_PATH = "user_management/password_reset/{0}"
|
|
102
|
+
USER_FEATURE_FLAGS_PATH = "user_management/users/{0}/feature-flags"
|
|
100
103
|
|
|
101
104
|
|
|
102
105
|
UsersListResource = WorkOSListResource[User, UsersListFilters, ListMetadata]
|
|
@@ -113,6 +116,10 @@ InvitationsListResource = WorkOSListResource[
|
|
|
113
116
|
Invitation, InvitationsListFilters, ListMetadata
|
|
114
117
|
]
|
|
115
118
|
|
|
119
|
+
FeatureFlagsListResource = WorkOSListResource[
|
|
120
|
+
FeatureFlag, FeatureFlagListFilters, ListMetadata
|
|
121
|
+
]
|
|
122
|
+
|
|
116
123
|
from workos.types.user_management.list_filters import SessionsListFilters
|
|
117
124
|
|
|
118
125
|
SessionsListResource = WorkOSListResource[
|
|
@@ -908,6 +915,29 @@ class UserManagementModule(Protocol):
|
|
|
908
915
|
"""
|
|
909
916
|
...
|
|
910
917
|
|
|
918
|
+
def list_feature_flags(
|
|
919
|
+
self,
|
|
920
|
+
user_id: str,
|
|
921
|
+
*,
|
|
922
|
+
limit: int = DEFAULT_LIST_RESPONSE_LIMIT,
|
|
923
|
+
before: Optional[str] = None,
|
|
924
|
+
after: Optional[str] = None,
|
|
925
|
+
order: PaginationOrder = "desc",
|
|
926
|
+
) -> SyncOrAsync[FeatureFlagsListResource]:
|
|
927
|
+
"""Retrieve a list of feature flags for a user
|
|
928
|
+
|
|
929
|
+
Args:
|
|
930
|
+
user_id (str): User's unique identifier
|
|
931
|
+
limit (int): Maximum number of records to return. (Optional)
|
|
932
|
+
before (str): Pagination cursor to receive records before a provided Feature Flag ID. (Optional)
|
|
933
|
+
after (str): Pagination cursor to receive records after a provided Feature Flag ID. (Optional)
|
|
934
|
+
order (Literal["asc","desc"]): Sort records in either ascending or descending (default) order by created_at timestamp. (Optional)
|
|
935
|
+
|
|
936
|
+
Returns:
|
|
937
|
+
FeatureFlagsListResource: Feature flags list response from WorkOS.
|
|
938
|
+
"""
|
|
939
|
+
...
|
|
940
|
+
|
|
911
941
|
|
|
912
942
|
class UserManagement(UserManagementModule):
|
|
913
943
|
_http_client: SyncHTTPClient
|
|
@@ -1603,6 +1633,34 @@ class UserManagement(UserManagementModule):
|
|
|
1603
1633
|
|
|
1604
1634
|
return Invitation.model_validate(response)
|
|
1605
1635
|
|
|
1636
|
+
def list_feature_flags(
|
|
1637
|
+
self,
|
|
1638
|
+
user_id: str,
|
|
1639
|
+
*,
|
|
1640
|
+
limit: int = DEFAULT_LIST_RESPONSE_LIMIT,
|
|
1641
|
+
before: Optional[str] = None,
|
|
1642
|
+
after: Optional[str] = None,
|
|
1643
|
+
order: PaginationOrder = "desc",
|
|
1644
|
+
) -> FeatureFlagsListResource:
|
|
1645
|
+
list_params: FeatureFlagListFilters = {
|
|
1646
|
+
"limit": limit,
|
|
1647
|
+
"before": before,
|
|
1648
|
+
"after": after,
|
|
1649
|
+
"order": order,
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
response = self._http_client.request(
|
|
1653
|
+
USER_FEATURE_FLAGS_PATH.format(user_id),
|
|
1654
|
+
method=REQUEST_METHOD_GET,
|
|
1655
|
+
params=list_params,
|
|
1656
|
+
)
|
|
1657
|
+
|
|
1658
|
+
return FeatureFlagsListResource(
|
|
1659
|
+
list_method=self.list_feature_flags,
|
|
1660
|
+
list_args=list_params,
|
|
1661
|
+
**ListPage[FeatureFlag](**response).model_dump(),
|
|
1662
|
+
)
|
|
1663
|
+
|
|
1606
1664
|
|
|
1607
1665
|
class AsyncUserManagement(UserManagementModule):
|
|
1608
1666
|
_http_client: AsyncHTTPClient
|
|
@@ -2312,3 +2370,31 @@ class AsyncUserManagement(UserManagementModule):
|
|
|
2312
2370
|
)
|
|
2313
2371
|
|
|
2314
2372
|
return Invitation.model_validate(response)
|
|
2373
|
+
|
|
2374
|
+
async def list_feature_flags(
|
|
2375
|
+
self,
|
|
2376
|
+
user_id: str,
|
|
2377
|
+
*,
|
|
2378
|
+
limit: int = DEFAULT_LIST_RESPONSE_LIMIT,
|
|
2379
|
+
before: Optional[str] = None,
|
|
2380
|
+
after: Optional[str] = None,
|
|
2381
|
+
order: PaginationOrder = "desc",
|
|
2382
|
+
) -> FeatureFlagsListResource:
|
|
2383
|
+
list_params: FeatureFlagListFilters = {
|
|
2384
|
+
"limit": limit,
|
|
2385
|
+
"before": before,
|
|
2386
|
+
"after": after,
|
|
2387
|
+
"order": order,
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
response = await self._http_client.request(
|
|
2391
|
+
USER_FEATURE_FLAGS_PATH.format(user_id),
|
|
2392
|
+
method=REQUEST_METHOD_GET,
|
|
2393
|
+
params=list_params,
|
|
2394
|
+
)
|
|
2395
|
+
|
|
2396
|
+
return FeatureFlagsListResource(
|
|
2397
|
+
list_method=self.list_feature_flags,
|
|
2398
|
+
list_args=list_params,
|
|
2399
|
+
**ListPage[FeatureFlag](**response).model_dump(),
|
|
2400
|
+
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
workos/__about__.py,sha256=
|
|
1
|
+
workos/__about__.py,sha256=a8T8r-F_Bc9Q5_He3ZLzqGLEGQhwQ_2KCKENsHZ4q6g,406
|
|
2
2
|
workos/__init__.py,sha256=hOdbO_MJCvpLx8EbRjQg-fvFAB-glJmrmxUZK8kWG0k,167
|
|
3
3
|
workos/_base_client.py,sha256=CIfAk6Bdj1hpOy3TcfIGXy8X4Efa7wi7cKracjkcTHk,3633
|
|
4
4
|
workos/_client_configuration.py,sha256=g3eXhtrEMN6CW0hZ5uHb2PmLurXjyBkWZeQYMPeJD6s,222
|
|
@@ -18,7 +18,7 @@ workos/portal.py,sha256=lzf3fnOor4AyVdHCHMuJzVSpAC9LWWdC5sZIRtCsb0c,2443
|
|
|
18
18
|
workos/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
workos/session.py,sha256=Fh9Y7fyjoX_cK2TayhNzpL725pwrNg-QClsgEfuMZsU,12412
|
|
20
20
|
workos/sso.py,sha256=ZBC3y-IRmxG0jPd0BOj7s7XQkXJoTLUg1fx-h3Gfy4g,13541
|
|
21
|
-
workos/user_management.py,sha256=
|
|
21
|
+
workos/user_management.py,sha256=OJ-_RiLUhjL662t6A3t_eOBKfqWW0_sX-HjfiUS6hsc,86028
|
|
22
22
|
workos/vault.py,sha256=SJXr3nJ03qJFuf30FjevMD6LLlDNX3MGaKlYGgICRRE,15657
|
|
23
23
|
workos/webhooks.py,sha256=CuwBxh6va9VZFVSXOknveGt6CCGDF3em07a-J12DbXI,4790
|
|
24
24
|
workos/widgets.py,sha256=bfbR0hQOHZabbgGL2ekD5sY1sjiUoWBTdrBd_a6WmBc,1721
|
|
@@ -131,8 +131,8 @@ workos/utils/crypto_provider.py,sha256=QeQSR4t9xLlb90kEfl8onVUsf1yCkYq0EjFTxK0mU
|
|
|
131
131
|
workos/utils/http_client.py,sha256=TM5yMFFExmAE8D2Z43-5O301tRbnylLG0aXO0isGorE,6197
|
|
132
132
|
workos/utils/pagination_order.py,sha256=_-et1DDJLG0czarTU7op4W6RA0V1f85GNsUgtyRU55Q,70
|
|
133
133
|
workos/utils/request_helper.py,sha256=NaO16qPPbSNnCeE0fiNKYb8gM-dK_okYVJbLGrEGXz8,793
|
|
134
|
-
workos-5.
|
|
135
|
-
workos-5.
|
|
136
|
-
workos-5.
|
|
137
|
-
workos-5.
|
|
138
|
-
workos-5.
|
|
134
|
+
workos-5.37.0.dist-info/LICENSE,sha256=mU--WL1JzelH2tXpKVoOlpud4cpqKSRTtdArCvYZmb4,1063
|
|
135
|
+
workos-5.37.0.dist-info/METADATA,sha256=6JP8iaTlAshQvSIykV7Fr2gYo-BwjBDXzwLISERf-gE,4187
|
|
136
|
+
workos-5.37.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
137
|
+
workos-5.37.0.dist-info/top_level.txt,sha256=ZFskIfue1Tw-JwjyIXRvdsAl9i0DX9VbqmgICXV84Sk,7
|
|
138
|
+
workos-5.37.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|