Skip to content

Commit

Permalink
Updates for beta branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgd committed Jul 30, 2024
1 parent 06f4360 commit 9fae9a4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 21 deletions.
1 change: 1 addition & 0 deletions tests/test_user_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ def test_authenticate_with_refresh_token(
assert request_kwargs["json"] == {
**params,
**base_authentication_params,
"organization_id": None,
"grant_type": "refresh_token",
}

Expand Down
8 changes: 1 addition & 7 deletions workos/directory_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def get_directory(self, directory: str) -> SyncOrAsync[Directory]: ...

def list_directories(
self,
domain: Optional[str] = None,
search: Optional[str] = None,
limit: int = DEFAULT_LIST_RESPONSE_LIMIT,
before: Optional[str] = None,
Expand Down Expand Up @@ -250,7 +249,6 @@ def get_directory(self, directory: str) -> Directory:

def list_directories(
self,
domain: Optional[str] = None,
search: Optional[str] = None,
limit: int = DEFAULT_LIST_RESPONSE_LIMIT,
before: Optional[str] = None,
Expand All @@ -261,8 +259,7 @@ def list_directories(
"""Gets details for existing Directories.
Args:
domain (str): Domain of a Directory. (Optional)
organization: ID of an Organization (Optional)
organization_id: ID of an Organization (Optional)
search (str): Searchable text for a Directory. (Optional)
limit (int): Maximum number of records to return. (Optional)
before (str): Pagination cursor to receive records before a provided Directory ID. (Optional)
Expand All @@ -278,7 +275,6 @@ def list_directories(
"before": before,
"after": after,
"order": order,
"domain": domain,
"organization_id": organization_id,
"search": search,
}
Expand Down Expand Up @@ -478,7 +474,6 @@ async def get_directory(self, directory: str) -> Directory:

async def list_directories(
self,
domain: Optional[str] = None,
search: Optional[str] = None,
limit: int = DEFAULT_LIST_RESPONSE_LIMIT,
before: Optional[str] = None,
Expand All @@ -502,7 +497,6 @@ async def list_directories(
"""

list_params: DirectoryListFilters = {
"domain": domain,
"organization_id": organization_id,
"search": search,
"limit": limit,
Expand Down
17 changes: 3 additions & 14 deletions workos/resources/directory_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@


class Directory(WorkOSModel):
"""Representation of a Directory Response as returned by WorkOS through the Directory Sync feature.
Attributes:
OBJECT_FIELDS (list): List of fields a Directory is comprised of.
"""
"""Representation of a Directory Response as returned by WorkOS through the Directory Sync feature."""

id: str
object: Literal["directory"]
Expand All @@ -46,11 +43,7 @@ class Directory(WorkOSModel):


class DirectoryGroup(WorkOSModel):
"""Representation of a Directory Group as returned by WorkOS through the Directory Sync feature.
Attributes:
OBJECT_FIELDS (list): List of fields a DirectoryGroup is comprised of.
"""
"""Representation of a Directory Group as returned by WorkOS through the Directory Sync feature."""

id: str
object: Literal["directory_group"]
Expand All @@ -64,10 +57,6 @@ class DirectoryGroup(WorkOSModel):


class DirectoryUserWithGroups(DirectoryUser):
"""Representation of a Directory User as returned by WorkOS through the Directory Sync feature.
Attributes:
OBJECT_FIELDS (list): List of fields a DirectoryUser is comprised of.
"""
"""Representation of a Directory User as returned by WorkOS through the Directory Sync feature."""

groups: List[DirectoryGroup]
1 change: 1 addition & 0 deletions workos/user_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ def authenticate_with_organization_selection(
def authenticate_with_refresh_token(
self,
refresh_token: str,
organization_id: Optional[str] = None,
ip_address: Optional[str] = None,
user_agent: Optional[str] = None,
) -> RefreshTokenAuthenticationResponse: ...
Expand Down

0 comments on commit 9fae9a4

Please sign in to comment.