workos 5.31.2__tar.gz → 5.33.0__tar.gz
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-5.31.2 → workos-5.33.0}/PKG-INFO +1 -1
- {workos-5.31.2 → workos-5.33.0}/tests/test_user_management.py +81 -0
- {workos-5.31.2 → workos-5.33.0}/workos/__about__.py +1 -1
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/user.py +1 -0
- {workos-5.31.2 → workos-5.33.0}/workos/user_management.py +32 -0
- {workos-5.31.2 → workos-5.33.0}/workos.egg-info/PKG-INFO +1 -1
- {workos-5.31.2 → workos-5.33.0}/LICENSE +0 -0
- {workos-5.31.2 → workos-5.33.0}/README.md +0 -0
- {workos-5.31.2 → workos-5.33.0}/setup.cfg +0 -0
- {workos-5.31.2 → workos-5.33.0}/setup.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_async_http_client.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_audit_logs.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_client.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_directory_sync.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_events.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_fga.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_mfa.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_organization_domains.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_organizations.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_passwordless.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_portal.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_session.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_sso.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_sync_http_client.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_user_management_list_sessions.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_user_management_revoke_session.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_vault.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_webhooks.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/tests/test_widgets.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/_base_client.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/_client_configuration.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/async_client.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/audit_logs.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/client.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/directory_sync.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/events.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/exceptions.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/fga.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/mfa.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/organization_domains.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/organizations.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/passwordless.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/portal.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/py.typed +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/session.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/sso.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/audit_logs/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/audit_logs/audit_log_event.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/audit_logs/audit_log_event_actor.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/audit_logs/audit_log_event_context.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/audit_logs/audit_log_event_target.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/audit_logs/audit_log_export.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/audit_logs/audit_log_metadata.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/directory_sync/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/directory_sync/directory.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/directory_sync/directory_group.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/directory_sync/directory_state.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/directory_sync/directory_type.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/directory_sync/directory_user.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/directory_sync/list_filters.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/authentication_payload.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/connection_payload_with_legacy_fields.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/directory_group_membership_payload.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/directory_group_with_previous_attributes.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/directory_payload.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/directory_payload_with_legacy_fields.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/directory_user_with_previous_attributes.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/event.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/event_model.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/event_type.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/list_filters.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/organization_domain_verification_failed_payload.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/previous_attributes.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/events/session_created_payload.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/feature_flags/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/feature_flags/feature_flag.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/feature_flags/list_filters.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/fga/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/fga/authorization_resource_types.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/fga/authorization_resources.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/fga/check.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/fga/list_filters.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/fga/warnings.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/fga/warrant.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/list_resource.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/metadata.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/mfa/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/mfa/authentication_challenge.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/mfa/authentication_challenge_verification_response.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/mfa/authentication_factor.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/mfa/authentication_factor_totp_and_challenge_response.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/mfa/enroll_authentication_factor_type.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/organization_domains/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/organization_domains/organization_domain.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/organizations/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/organizations/domain_data_input.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/organizations/list_filters.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/organizations/organization.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/organizations/organization_common.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/passwordless/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/passwordless/passwordless_session.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/passwordless/passwordless_session_type.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/portal/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/portal/portal_link.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/portal/portal_link_intent.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/portal/portal_link_intent_options.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/roles/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/roles/role.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/sso/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/sso/connection.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/sso/connection_domain.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/sso/profile.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/sso/sso_provider_type.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/authenticate_with_common.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/authentication_response.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/email_verification.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/impersonator.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/invitation.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/list_filters.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/magic_auth.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/oauth_tokens.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/organization_membership.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/password_hash_type.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/password_reset.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/screen_hint.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/session.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/user_management/user_management_provider_type.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/vault/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/vault/key.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/vault/object.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/webhooks/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/webhooks/webhook.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/webhooks/webhook_model.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/webhooks/webhook_payload.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/widgets/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/widgets/widget_scope.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/widgets/widget_token_response.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/types/workos_model.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/typing/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/typing/literals.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/typing/sync_or_async.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/typing/untyped_literal.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/typing/webhooks.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/utils/__init__.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/utils/_base_http_client.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/utils/crypto_provider.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/utils/http_client.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/utils/pagination_order.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/utils/request_helper.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/vault.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/webhooks.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos/widgets.py +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos.egg-info/SOURCES.txt +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos.egg-info/dependency_links.txt +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos.egg-info/not-zip-safe +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos.egg-info/requires.txt +0 -0
- {workos-5.31.2 → workos-5.33.0}/workos.egg-info/top_level.txt +0 -0
|
@@ -414,6 +414,7 @@ class TestUserManagement(UserManagementFixtures):
|
|
|
414
414
|
assert user.id == "user_01H7ZGXFP5C6BBQY6Z7277ZCT0"
|
|
415
415
|
assert user.profile_picture_url == "https://example.com/profile-picture.jpg"
|
|
416
416
|
assert user.last_sign_in_at == "2021-06-25T19:07:33.155Z"
|
|
417
|
+
assert user.locale == "en-US"
|
|
417
418
|
|
|
418
419
|
def test_get_user_by_external_id(
|
|
419
420
|
self, mock_user, capture_and_mock_http_client_request
|
|
@@ -434,6 +435,7 @@ class TestUserManagement(UserManagementFixtures):
|
|
|
434
435
|
assert user.id == "user_01H7ZGXFP5C6BBQY6Z7277ZCT0"
|
|
435
436
|
assert user.profile_picture_url == "https://example.com/profile-picture.jpg"
|
|
436
437
|
assert user.last_sign_in_at == "2021-06-25T19:07:33.155Z"
|
|
438
|
+
assert user.locale == "en-US"
|
|
437
439
|
assert user.metadata == mock_user["metadata"]
|
|
438
440
|
|
|
439
441
|
def test_list_users_auto_pagination(
|
|
@@ -492,6 +494,29 @@ class TestUserManagement(UserManagementFixtures):
|
|
|
492
494
|
"password": "password",
|
|
493
495
|
}
|
|
494
496
|
|
|
497
|
+
def test_update_user_with_locale(
|
|
498
|
+
self, mock_user, capture_and_mock_http_client_request
|
|
499
|
+
):
|
|
500
|
+
request_kwargs = capture_and_mock_http_client_request(
|
|
501
|
+
self.http_client, mock_user, 200
|
|
502
|
+
)
|
|
503
|
+
|
|
504
|
+
params = {
|
|
505
|
+
"first_name": "Marcelina",
|
|
506
|
+
"locale": "fr-FR",
|
|
507
|
+
}
|
|
508
|
+
user = syncify(
|
|
509
|
+
self.user_management.update_user(
|
|
510
|
+
user_id="user_01H7ZGXFP5C6BBQY6Z7277ZCT0", **params
|
|
511
|
+
)
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
assert request_kwargs["url"].endswith("users/user_01H7ZGXFP5C6BBQY6Z7277ZCT0")
|
|
515
|
+
assert user.id == "user_01H7ZGXFP5C6BBQY6Z7277ZCT0"
|
|
516
|
+
assert request_kwargs["method"] == "put"
|
|
517
|
+
assert request_kwargs["json"]["first_name"] == "Marcelina"
|
|
518
|
+
assert request_kwargs["json"]["locale"] == "fr-FR"
|
|
519
|
+
|
|
495
520
|
def test_delete_user(self, capture_and_mock_http_client_request):
|
|
496
521
|
request_kwargs = capture_and_mock_http_client_request(
|
|
497
522
|
http_client=self.http_client, status_code=204
|
|
@@ -1169,3 +1194,59 @@ class TestUserManagement(UserManagementFixtures):
|
|
|
1169
1194
|
)
|
|
1170
1195
|
assert request_kwargs["method"] == "post"
|
|
1171
1196
|
assert isinstance(invitation, Invitation)
|
|
1197
|
+
|
|
1198
|
+
def test_resend_invitation(
|
|
1199
|
+
self, capture_and_mock_http_client_request, mock_invitation
|
|
1200
|
+
):
|
|
1201
|
+
request_kwargs = capture_and_mock_http_client_request(
|
|
1202
|
+
self.http_client, mock_invitation, 200
|
|
1203
|
+
)
|
|
1204
|
+
|
|
1205
|
+
invitation = syncify(self.user_management.resend_invitation("invitation_ABCDE"))
|
|
1206
|
+
|
|
1207
|
+
assert request_kwargs["url"].endswith(
|
|
1208
|
+
"user_management/invitations/invitation_ABCDE/resend"
|
|
1209
|
+
)
|
|
1210
|
+
assert request_kwargs["method"] == "post"
|
|
1211
|
+
assert isinstance(invitation, Invitation)
|
|
1212
|
+
assert invitation.id == "invitation_ABCDE"
|
|
1213
|
+
|
|
1214
|
+
def test_resend_invitation_not_found(self, capture_and_mock_http_client_request):
|
|
1215
|
+
error_response = {
|
|
1216
|
+
"message": "Invitation not found",
|
|
1217
|
+
"code": "not_found",
|
|
1218
|
+
}
|
|
1219
|
+
capture_and_mock_http_client_request(self.http_client, error_response, 404)
|
|
1220
|
+
|
|
1221
|
+
with pytest.raises(Exception):
|
|
1222
|
+
syncify(self.user_management.resend_invitation("invitation_nonexistent"))
|
|
1223
|
+
|
|
1224
|
+
def test_resend_invitation_expired(self, capture_and_mock_http_client_request):
|
|
1225
|
+
error_response = {
|
|
1226
|
+
"message": "Invite has expired.",
|
|
1227
|
+
"code": "invite_expired",
|
|
1228
|
+
}
|
|
1229
|
+
capture_and_mock_http_client_request(self.http_client, error_response, 400)
|
|
1230
|
+
|
|
1231
|
+
with pytest.raises(Exception):
|
|
1232
|
+
syncify(self.user_management.resend_invitation("invitation_expired"))
|
|
1233
|
+
|
|
1234
|
+
def test_resend_invitation_revoked(self, capture_and_mock_http_client_request):
|
|
1235
|
+
error_response = {
|
|
1236
|
+
"message": "Invite has been revoked.",
|
|
1237
|
+
"code": "invite_revoked",
|
|
1238
|
+
}
|
|
1239
|
+
capture_and_mock_http_client_request(self.http_client, error_response, 400)
|
|
1240
|
+
|
|
1241
|
+
with pytest.raises(Exception):
|
|
1242
|
+
syncify(self.user_management.resend_invitation("invitation_revoked"))
|
|
1243
|
+
|
|
1244
|
+
def test_resend_invitation_accepted(self, capture_and_mock_http_client_request):
|
|
1245
|
+
error_response = {
|
|
1246
|
+
"message": "Invite has already been accepted.",
|
|
1247
|
+
"code": "invite_accepted",
|
|
1248
|
+
}
|
|
1249
|
+
capture_and_mock_http_client_request(self.http_client, error_response, 400)
|
|
1250
|
+
|
|
1251
|
+
with pytest.raises(Exception):
|
|
1252
|
+
syncify(self.user_management.resend_invitation("invitation_accepted"))
|
|
@@ -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)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{workos-5.31.2 → workos-5.33.0}/workos/types/events/connection_payload_with_legacy_fields.py
RENAMED
|
File without changes
|
|
File without changes
|
{workos-5.31.2 → workos-5.33.0}/workos/types/events/directory_group_with_previous_attributes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{workos-5.31.2 → workos-5.33.0}/workos/types/events/directory_user_with_previous_attributes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{workos-5.31.2 → workos-5.33.0}/workos/types/mfa/authentication_challenge_verification_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{workos-5.31.2 → workos-5.33.0}/workos/types/user_management/user_management_provider_type.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|