Skip to content

Commit

Permalink
feat: Support optional userId parameter for updating files, folders…
Browse files Browse the repository at this point in the history
… and web links (box/box-openapi#488) (#406)
  • Loading branch information
box-sdk-build authored Dec 9, 2024
1 parent e54c8d5 commit d9cff4c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "5604447", "specHash": "d7dfe68", "version": "1.8.0" }
{ "engineHash": "5604447", "specHash": "c9d7bb5", "version": "1.8.0" }
7 changes: 6 additions & 1 deletion box_sdk_gen/managers/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,18 @@


class UpdateFileByIdParent(BaseObject):
def __init__(self, *, id: Optional[str] = None, **kwargs):
def __init__(
self, *, id: Optional[str] = None, user_id: Optional[str] = None, **kwargs
):
"""
:param id: The ID of parent item, defaults to None
:type id: Optional[str], optional
:param user_id: The input for `user_id` is optional. Moving to non-root folder is not allowed when `user_id` is present. Parent folder id should be zero when `user_id` is provided., defaults to None
:type user_id: Optional[str], optional
"""
super().__init__(**kwargs)
self.id = id
self.user_id = user_id


class UpdateFileByIdSharedLinkAccessField(str, Enum):
Expand Down
12 changes: 7 additions & 5 deletions box_sdk_gen/managers/folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,18 @@ class UpdateFolderByIdSyncState(str, Enum):


class UpdateFolderByIdParent(BaseObject):
def __init__(self, *, id: Optional[str] = None, **kwargs):
def __init__(
self, *, id: Optional[str] = None, user_id: Optional[str] = None, **kwargs
):
"""
:param id: The ID of the new parent folder, defaults to None
:param id: The ID of parent item, defaults to None
:type id: Optional[str], optional
:param user_id: The input for `user_id` is optional. Moving to non-root folder is not allowed when `user_id` is present. Parent folder id should be zero when `user_id` is provided., defaults to None
:type user_id: Optional[str], optional
"""
super().__init__(**kwargs)
self.id = id
self.user_id = user_id


class UpdateFolderByIdSharedLinkAccessField(str, Enum):
Expand Down Expand Up @@ -489,9 +494,6 @@ def update_folder_by_id(
:param can_non_owners_invite: Specifies if users who are not the owner
of the folder can invite new collaborators to the folder., defaults to None
:type can_non_owners_invite: Optional[bool], optional
:param parent: The parent folder for this folder. Use this to move
the folder or to restore it out of the trash., defaults to None
:type parent: Optional[UpdateFolderByIdParent], optional
:param tags: The tags for this item. These tags are shown in
the Box web app and mobile apps next to an item.
Expand Down
7 changes: 6 additions & 1 deletion box_sdk_gen/managers/web_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,18 @@ def __init__(self, id: str, **kwargs):


class UpdateWebLinkByIdParent(BaseObject):
def __init__(self, *, id: Optional[str] = None, **kwargs):
def __init__(
self, *, id: Optional[str] = None, user_id: Optional[str] = None, **kwargs
):
"""
:param id: The ID of parent item, defaults to None
:type id: Optional[str], optional
:param user_id: The input for `user_id` is optional. Moving to non-root folder is not allowed when `user_id` is present. Parent folder id should be zero when `user_id` is provided., defaults to None
:type user_id: Optional[str], optional
"""
super().__init__(**kwargs)
self.id = id
self.user_id = user_id


class UpdateWebLinkByIdSharedLinkAccessField(str, Enum):
Expand Down
2 changes: 1 addition & 1 deletion docs/folders.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ downscoped_client.folders.update_folder_by_id(folder.id, name=get_uuid())
- can_non_owners_invite `Optional[bool]`
- Specifies if users who are not the owner of the folder can invite new collaborators to the folder.
- parent `Optional[UpdateFolderByIdParent]`
- The parent folder for this folder. Use this to move the folder or to restore it out of the trash.
-
- shared_link `Optional[UpdateFolderByIdSharedLink]`
-
- folder_upload_email `Optional[UpdateFolderByIdFolderUploadEmail]`
Expand Down

0 comments on commit d9cff4c

Please sign in to comment.