workos 5.31.2__py3-none-any.whl → 5.33.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/types/user_management/user.py +1 -0
- workos/user_management.py +32 -0
- {workos-5.31.2.dist-info → workos-5.33.0.dist-info}/METADATA +1 -1
- {workos-5.31.2.dist-info → workos-5.33.0.dist-info}/RECORD +8 -8
- {workos-5.31.2.dist-info → workos-5.33.0.dist-info}/LICENSE +0 -0
- {workos-5.31.2.dist-info → workos-5.33.0.dist-info}/WHEEL +0 -0
- {workos-5.31.2.dist-info → workos-5.33.0.dist-info}/top_level.txt +0 -0
workos/__about__.py
CHANGED
workos/user_management.py
CHANGED
|
@@ -94,6 +94,7 @@ INVITATION_PATH = "user_management/invitations"
|
|
|
94
94
|
INVITATION_DETAIL_PATH = "user_management/invitations/{0}"
|
|
95
95
|
INVITATION_DETAIL_BY_TOKEN_PATH = "user_management/invitations/by_token/{0}"
|
|
96
96
|
INVITATION_REVOKE_PATH = "user_management/invitations/{0}/revoke"
|
|
97
|
+
INVITATION_RESEND_PATH = "user_management/invitations/{0}/resend"
|
|
97
98
|
PASSWORD_RESET_PATH = "user_management/password_reset"
|
|
98
99
|
PASSWORD_RESET_DETAIL_PATH = "user_management/password_reset/{0}"
|
|
99
100
|
|
|
@@ -225,6 +226,7 @@ class UserManagementModule(Protocol):
|
|
|
225
226
|
password_hash_type: Optional[PasswordHashType] = None,
|
|
226
227
|
external_id: Optional[str] = None,
|
|
227
228
|
metadata: Optional[Metadata] = None,
|
|
229
|
+
locale: Optional[str] = None,
|
|
228
230
|
) -> SyncOrAsync[User]:
|
|
229
231
|
"""Update user attributes.
|
|
230
232
|
|
|
@@ -237,6 +239,7 @@ class UserManagementModule(Protocol):
|
|
|
237
239
|
password (str): The password to set for the user. (Optional)
|
|
238
240
|
password_hash (str): The hashed password to set for the user, used when migrating from another user store. Mutually exclusive with password. (Optional)
|
|
239
241
|
password_hash_type (str): The algorithm originally used to hash the password, used when providing a password_hash. Valid values are 'bcrypt', `firebase-scrypt`, and `ssha`. (Optional)
|
|
242
|
+
locale (str): The user's locale. (Optional)
|
|
240
243
|
|
|
241
244
|
Returns:
|
|
242
245
|
User: Updated User response from WorkOS.
|
|
@@ -894,6 +897,17 @@ class UserManagementModule(Protocol):
|
|
|
894
897
|
"""
|
|
895
898
|
...
|
|
896
899
|
|
|
900
|
+
def resend_invitation(self, invitation_id: str) -> SyncOrAsync[Invitation]:
|
|
901
|
+
"""Resends an existing Invitation.
|
|
902
|
+
|
|
903
|
+
Args:
|
|
904
|
+
invitation_id (str): The unique ID of the Invitation.
|
|
905
|
+
|
|
906
|
+
Returns:
|
|
907
|
+
Invitation: Invitation response from WorkOS.
|
|
908
|
+
"""
|
|
909
|
+
...
|
|
910
|
+
|
|
897
911
|
|
|
898
912
|
class UserManagement(UserManagementModule):
|
|
899
913
|
_http_client: SyncHTTPClient
|
|
@@ -1002,6 +1016,7 @@ class UserManagement(UserManagementModule):
|
|
|
1002
1016
|
password_hash_type: Optional[PasswordHashType] = None,
|
|
1003
1017
|
external_id: Optional[str] = None,
|
|
1004
1018
|
metadata: Optional[Metadata] = None,
|
|
1019
|
+
locale: Optional[str] = None,
|
|
1005
1020
|
) -> User:
|
|
1006
1021
|
json = {
|
|
1007
1022
|
"first_name": first_name,
|
|
@@ -1013,6 +1028,7 @@ class UserManagement(UserManagementModule):
|
|
|
1013
1028
|
"password_hash_type": password_hash_type,
|
|
1014
1029
|
"external_id": external_id,
|
|
1015
1030
|
"metadata": metadata,
|
|
1031
|
+
"locale": locale,
|
|
1016
1032
|
}
|
|
1017
1033
|
|
|
1018
1034
|
response = self._http_client.request(
|
|
@@ -1580,6 +1596,13 @@ class UserManagement(UserManagementModule):
|
|
|
1580
1596
|
|
|
1581
1597
|
return Invitation.model_validate(response)
|
|
1582
1598
|
|
|
1599
|
+
def resend_invitation(self, invitation_id: str) -> Invitation:
|
|
1600
|
+
response = self._http_client.request(
|
|
1601
|
+
INVITATION_RESEND_PATH.format(invitation_id), method=REQUEST_METHOD_POST
|
|
1602
|
+
)
|
|
1603
|
+
|
|
1604
|
+
return Invitation.model_validate(response)
|
|
1605
|
+
|
|
1583
1606
|
|
|
1584
1607
|
class AsyncUserManagement(UserManagementModule):
|
|
1585
1608
|
_http_client: AsyncHTTPClient
|
|
@@ -1688,6 +1711,7 @@ class AsyncUserManagement(UserManagementModule):
|
|
|
1688
1711
|
password_hash_type: Optional[PasswordHashType] = None,
|
|
1689
1712
|
external_id: Optional[str] = None,
|
|
1690
1713
|
metadata: Optional[Metadata] = None,
|
|
1714
|
+
locale: Optional[str] = None,
|
|
1691
1715
|
) -> User:
|
|
1692
1716
|
json = {
|
|
1693
1717
|
"first_name": first_name,
|
|
@@ -1699,6 +1723,7 @@ class AsyncUserManagement(UserManagementModule):
|
|
|
1699
1723
|
"password_hash_type": password_hash_type,
|
|
1700
1724
|
"external_id": external_id,
|
|
1701
1725
|
"metadata": metadata,
|
|
1726
|
+
"locale": locale,
|
|
1702
1727
|
}
|
|
1703
1728
|
|
|
1704
1729
|
response = await self._http_client.request(
|
|
@@ -2280,3 +2305,10 @@ class AsyncUserManagement(UserManagementModule):
|
|
|
2280
2305
|
)
|
|
2281
2306
|
|
|
2282
2307
|
return Invitation.model_validate(response)
|
|
2308
|
+
|
|
2309
|
+
async def resend_invitation(self, invitation_id: str) -> Invitation:
|
|
2310
|
+
response = await self._http_client.request(
|
|
2311
|
+
INVITATION_RESEND_PATH.format(invitation_id), method=REQUEST_METHOD_POST
|
|
2312
|
+
)
|
|
2313
|
+
|
|
2314
|
+
return Invitation.model_validate(response)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
workos/__about__.py,sha256=-
|
|
1
|
+
workos/__about__.py,sha256=-nB8UrwKFTtayBxBV9wbxK-eZX381M0MPI4jlQUT290,406
|
|
2
2
|
workos/__init__.py,sha256=hOdbO_MJCvpLx8EbRjQg-fvFAB-glJmrmxUZK8kWG0k,167
|
|
3
3
|
workos/_base_client.py,sha256=YWLXBpd0YeID3WKYZkKa4l9ZuB9e6HgdLmPKZIzXsME,3599
|
|
4
4
|
workos/_client_configuration.py,sha256=g3eXhtrEMN6CW0hZ5uHb2PmLurXjyBkWZeQYMPeJD6s,222
|
|
@@ -17,7 +17,7 @@ workos/portal.py,sha256=lzf3fnOor4AyVdHCHMuJzVSpAC9LWWdC5sZIRtCsb0c,2443
|
|
|
17
17
|
workos/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
workos/session.py,sha256=Fh9Y7fyjoX_cK2TayhNzpL725pwrNg-QClsgEfuMZsU,12412
|
|
19
19
|
workos/sso.py,sha256=ZBC3y-IRmxG0jPd0BOj7s7XQkXJoTLUg1fx-h3Gfy4g,13541
|
|
20
|
-
workos/user_management.py,sha256=
|
|
20
|
+
workos/user_management.py,sha256=q3rRWz3uxwGmCHswZnthQCV0lymo-LakYd-Y6wupSBA,83098
|
|
21
21
|
workos/vault.py,sha256=SJXr3nJ03qJFuf30FjevMD6LLlDNX3MGaKlYGgICRRE,15657
|
|
22
22
|
workos/webhooks.py,sha256=CuwBxh6va9VZFVSXOknveGt6CCGDF3em07a-J12DbXI,4790
|
|
23
23
|
workos/widgets.py,sha256=bfbR0hQOHZabbgGL2ekD5sY1sjiUoWBTdrBd_a6WmBc,1721
|
|
@@ -105,7 +105,7 @@ workos/types/user_management/password_hash_type.py,sha256=1752LWdXbaH6TZ6IxbJWeR
|
|
|
105
105
|
workos/types/user_management/password_reset.py,sha256=-NJCfEh4Q1xS9fFXJaF_acYeuUc9POqERLh8urMhqt8,403
|
|
106
106
|
workos/types/user_management/screen_hint.py,sha256=DnPgvjRK-20i82v3YPzggna1rc6yOMyhiqwUdk01L3s,75
|
|
107
107
|
workos/types/user_management/session.py,sha256=crNGjN5pwGM3rXET7iCp0PZpSBK826P_bRlpFOhM5-4,2128
|
|
108
|
-
workos/types/user_management/user.py,sha256=
|
|
108
|
+
workos/types/user_management/user.py,sha256=qHI1zKn3WqFi5bT-g8GQiAUS_8xfpzyZRvOPBDUO3jM,636
|
|
109
109
|
workos/types/user_management/user_management_provider_type.py,sha256=t7S3zLf9n9GSYQJjshGRdiAfebYQKziGmUgbBlOmYuE,185
|
|
110
110
|
workos/types/vault/__init__.py,sha256=krBuIl8luysrtDf9-b8KTkXOHDOaSsOR-Aao6Wlil0Q,41
|
|
111
111
|
workos/types/vault/key.py,sha256=x30XBplSj9AviDDAB8MdpcULbZvvo2sUzi8RCmZQKxU,453
|
|
@@ -128,8 +128,8 @@ workos/utils/crypto_provider.py,sha256=QeQSR4t9xLlb90kEfl8onVUsf1yCkYq0EjFTxK0mU
|
|
|
128
128
|
workos/utils/http_client.py,sha256=TM5yMFFExmAE8D2Z43-5O301tRbnylLG0aXO0isGorE,6197
|
|
129
129
|
workos/utils/pagination_order.py,sha256=_-et1DDJLG0czarTU7op4W6RA0V1f85GNsUgtyRU55Q,70
|
|
130
130
|
workos/utils/request_helper.py,sha256=NaO16qPPbSNnCeE0fiNKYb8gM-dK_okYVJbLGrEGXz8,793
|
|
131
|
-
workos-5.
|
|
132
|
-
workos-5.
|
|
133
|
-
workos-5.
|
|
134
|
-
workos-5.
|
|
135
|
-
workos-5.
|
|
131
|
+
workos-5.33.0.dist-info/LICENSE,sha256=mU--WL1JzelH2tXpKVoOlpud4cpqKSRTtdArCvYZmb4,1063
|
|
132
|
+
workos-5.33.0.dist-info/METADATA,sha256=yqlekSvf2kMaq1cjaweH1L7mN2mo7lZnJ9XYhiRxz2U,4187
|
|
133
|
+
workos-5.33.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
134
|
+
workos-5.33.0.dist-info/top_level.txt,sha256=ZFskIfue1Tw-JwjyIXRvdsAl9i0DX9VbqmgICXV84Sk,7
|
|
135
|
+
workos-5.33.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|