diff --git a/plane/api/workspace_work_item_types/properties.py b/plane/api/workspace_work_item_types/properties.py index cdd6a0d..0b22414 100644 --- a/plane/api/workspace_work_item_types/properties.py +++ b/plane/api/workspace_work_item_types/properties.py @@ -29,19 +29,17 @@ def list(self, workspace_slug: str, type_id: str) -> list[str]: def create( self, workspace_slug: str, type_id: str, data: WorkspaceWorkItemTypePropertyLink - ) -> WorkItemProperty: - """Link a property to a workspace work item type. - + ) -> None: + """Link one or more properties to a workspace work item type. Args: workspace_slug: The workspace slug identifier type_id: UUID of the work item type - data: DTO containing the property_id to link + data: DTO containing properties (list of UUIDs) to link """ - response = self._post( + self._post( f"{workspace_slug}/work-item-types/{type_id}/properties/", data.model_dump(exclude_none=True), ) - return WorkItemProperty.model_validate(response) def delete(self, workspace_slug: str, type_id: str, property_id: str) -> None: """Unlink a property from a workspace work item type. diff --git a/plane/models/work_item_types.py b/plane/models/work_item_types.py index affac9d..6351fc4 100644 --- a/plane/models/work_item_types.py +++ b/plane/models/work_item_types.py @@ -58,8 +58,8 @@ class UpdateWorkItemType(BaseModel): class WorkspaceWorkItemTypePropertyLink(BaseModel): - """Request model for linking a property to a workspace work item type.""" + """Request model for linking properties to a workspace work item type.""" model_config = ConfigDict(extra="ignore", populate_by_name=True) - property_id: str + properties: list[str]