Skip to content

Commit 69dd994

Browse files
fix custom_attributes to be nullable
1 parent 2ce9c79 commit 69dd994

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/workos/types/directory_sync/directory_user.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
from typing import Any, Dict, Literal, Optional, Sequence, Union
22

3-
from workos.types.workos_model import WorkOSModel
43
from workos.types.directory_sync.directory_group import DirectoryGroup
5-
4+
from workos.types.workos_model import WorkOSModel
65

76
DirectoryUserState = Literal["active", "inactive"]
87

@@ -33,7 +32,7 @@ class DirectoryUser(WorkOSModel):
3332
# @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.
3433
username: Optional[str] = None
3534
state: DirectoryUserState
36-
custom_attributes: Dict[str, Any]
35+
custom_attributes: Optional[Dict[str, Any]] = None
3736
raw_attributes: Dict[str, Any]
3837
created_at: str
3938
updated_at: str

src/workos/types/user_management/organization_membership.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from typing import Any, Literal, Mapping, Optional, Sequence
2+
23
from typing_extensions import TypedDict
34

45
from workos.types.workos_model import WorkOSModel
@@ -21,6 +22,6 @@ class OrganizationMembership(WorkOSModel):
2122
role: OrganizationMembershipRole
2223
roles: Optional[Sequence[OrganizationMembershipRole]] = None
2324
status: LiteralOrUntyped[OrganizationMembershipStatus]
24-
custom_attributes: Mapping[str, Any]
25+
custom_attributes: Optional[Mapping[str, Any]] = None
2526
created_at: str
2627
updated_at: str

0 commit comments

Comments
 (0)