Skip to content

Commit 066505a

Browse files
authored
Add email standard attribute to DirectoryUser and mark deprecated standard attributes. (#413)
1 parent df3b2e5 commit 066505a

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

tests/test_directory_sync.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def mock_user_no_email(self):
6969
"organization_id": "org_01EZTR6WYX1A0DSE2CYMGXQ24Y",
7070
"first_name": "Marcelina",
7171
"last_name": "Davis",
72+
"email": None,
7273
"job_title": "Software Engineer",
7374
"emails": [],
7475
"username": "marcelina@foo-corp.com",

tests/utils/fixtures/mock_directory_user.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def __init__(self, id):
1616
first_name="gsuite_directory",
1717
last_name="fried chicken",
1818
job_title="developer",
19+
email="marcelina@foo-corp.com",
1920
emails=[
2021
DirectoryUserEmail(
2122
primary=True, type="work", value="marcelina@foo-corp.com"

workos/types/directory_sync/directory_user.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ class DirectoryUser(WorkOSModel):
2525
organization_id: str
2626
first_name: Optional[str] = None
2727
last_name: Optional[str] = None
28+
email: Optional[str] = None
29+
# @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.
2830
job_title: Optional[str] = None
31+
# @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.
2932
emails: Sequence[DirectoryUserEmail]
33+
# @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.
3034
username: Optional[str] = None
3135
state: DirectoryUserState
3236
custom_attributes: Dict[str, Any]

0 commit comments

Comments
 (0)