File size: 981 Bytes
b9c7f0e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using FlowAPI.Application.DTOs.Graph;

namespace FlowAPI.Application.Interfaces
{
    public interface IGraphService
    {
        Task<IEnumerable<GraphResponseDto>> GetAllByUserIdAsync(Guid userId);
        Task<GraphResponseDto?> GetByIdAsync(Guid id, Guid currentUserId);
        Task<FullGraphResponseDto?> GetFullByIdAsync(Guid id, Guid currentUserId);
        Task<GraphResponseDto> CreateAsync(CreateGraphDto dto, Guid currentUserId);
        Task<GraphResponseDto?> UpdateAsync(Guid id, UpdateGraphDto dto, Guid currentUserId);
        Task<bool> DeleteAsync(Guid id, Guid currentUserId);
        Task<bool> SaveFullGraphAsync(Guid id, FullGraphResponseDto dto, Guid currentUserId);

        Task<GraphResponseDto?> ShareGraphAsync(Guid graphId, Guid ownerId, ShareGraphRequestDto dto);
        Task<IEnumerable<SharedUserResponseDto>> GetSharedUsersAsync(Guid graphId, Guid ownerId);
        Task<bool> RevokeShareAsync(Guid graphId, Guid ownerId, Guid shareId);
    }
}