Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add email standard attribute to DirectoryUser and mark deprecated standard attributes #413

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/test_directory_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def mock_user_no_email(self):
"organization_id": "org_01EZTR6WYX1A0DSE2CYMGXQ24Y",
"first_name": "Marcelina",
"last_name": "Davis",
"email": None,
"job_title": "Software Engineer",
"emails": [],
"username": "[email protected]",
Expand Down
1 change: 1 addition & 0 deletions tests/utils/fixtures/mock_directory_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def __init__(self, id):
first_name="gsuite_directory",
last_name="fried chicken",
job_title="developer",
email="[email protected]",
emails=[
DirectoryUserEmail(
primary=True, type="work", value="[email protected]"
Expand Down
4 changes: 4 additions & 0 deletions workos/types/directory_sync/directory_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ class DirectoryUser(WorkOSModel):
organization_id: str
first_name: Optional[str] = None
last_name: Optional[str] = None
email: Optional[str] = None
# @deprecated Will be removed in a future major version. Enable the `job_title` custom attribute in dashboard and pull from customAttributes instead. See https://workos.com/docs/directory-sync/attributes/custom-attributes/auto-mapped-attributes for details.
job_title: Optional[str] = None
# @deprecated Will be removed in a future major version. Enable the `emails` custom attribute in dashboard and pull from customAttributes instead. See https://workos.com/docs/directory-sync/attributes/custom-attributes/auto-mapped-attributes for details.
emails: Sequence[DirectoryUserEmail]
# @deprecated Will be removed in a future major version. Enable the `username` custom attribute in dashboard and pull from customAttributes instead. See https://workos.com/docs/directory-sync/attributes/custom-attributes/auto-mapped-attributes for details.
username: Optional[str] = None
state: DirectoryUserState
custom_attributes: Dict[str, Any]
Expand Down