using ECPDAL.Collaboration.DTOs; using GB5Shared.DTO.Framework.Login; namespace ECPBLL.Collaboration.Interfaces; public interface ICollaborationSpaceBLL { Task GetCollaborationSpaceAsync(int collaborationSpaceId, LoginDTO login, CancellationToken ct); /// Dropdown picker — spaces the current user owns or is a member of, per the /// "Also link to Team Space(s)" and "Add Member" pickers in the ECP preview. Task GetSelectListCollaborationSpaceAsync(LoginDTO login, CancellationToken ct); /// Every space the current user owns or is a member of (union, de-duplicated), /// per the plan's "GetCollaborationSpaceList (by owner/member)" endpoint. Task GetCollaborationSpaceListAsync(LoginDTO login, CancellationToken ct); /// Creates (CollaborationSpaceId == 0) or updates (CollaborationSpaceId > 0) a space. /// On create, the caller becomes the space's owner and its first /// TCOLLABORATIONSPACEMEMBER row (Role=Owner). Task SaveCollaborationSpaceAsync(SaveCollaborationSpaceDTO dto, LoginDTO login, CancellationToken ct); /// Archives (soft-closes) a space — only the owner may do this. Task DeleteCollaborationSpaceAsync(int collaborationSpaceId, LoginDTO login, CancellationToken ct); /// Adds a member — only the owner may do this. Throws if the user is already a /// member (checked explicitly, not left to the DB unique-constraint violation). Task AddCollaborationSpaceMemberAsync(AddCollaborationSpaceMemberDTO dto, LoginDTO login, CancellationToken ct); /// Removes a member — the owner may remove anyone; a member may remove themselves. /// The owner cannot be removed (must archive the space instead). Task RemoveCollaborationSpaceMemberAsync(int collaborationSpaceId, int userId, LoginDTO login, CancellationToken ct); /// A single membership row — the Members tab's own Get, separate from the /// space-detail view's embedded Members list. Task GetCollaborationSpaceMemberAsync(int collaborationSpaceId, int userId, LoginDTO login, CancellationToken ct); /// All active members of a space — same rows as GetCollaborationSpace.Members, as /// its own standalone list endpoint per the Members tab's folder. Task GetCollaborationSpaceMemberListAsync(int collaborationSpaceId, LoginDTO login, CancellationToken ct); /// "Add Member" picker — active users not already a member of the space. Task GetSelectListCollaborationSpaceMemberAsync(int collaborationSpaceId, LoginDTO login, CancellationToken ct); /// Correspondence tab — correspondence sent or logged elsewhere in the platform /// whose ObjectTypeId/ObjectId identify this space, per Correspondence's own polymorphic /// ObjectTypeId+ObjectId shape (no separate "space link" join table — a space IS a /// first-class correspondence object, same as any business record). Task GetCollaborationSpaceCorrespondenceListAsync(int collaborationSpaceId, LoginDTO login, CancellationToken ct); }