public SharedResourcesResponse listSharedByMe(String bucket, String location, ListSharedResourcesRequest request) {
        Set<ResourceTypes> requestedResourceTypes = request.getResourceTypes();

        Set<ResourceDescriptor> shareResources = new HashSet<>();
        for (ResourceTypes resourceType : requestedResourceTypes) {
            ResourceDescriptor shareResource = getShareResource(ResourceTypes.SHARED_BY_ME, resourceType, bucket, location);
            shareResources.add(shareResource);
        }

        Set<MetadataBase> resultMetadata = new HashSet<>();
        for (ResourceDescriptor resource : shareResources) {
            String sharedResource = resourceService.getResource(resource);
            SharedByMeDto resourceToUsers = ProxyUtil.convertToObject(sharedResource, SharedByMeDto.class);
            if (resourceToUsers != null) {
                Map<String, Set<ResourceAccessType>> links = resourceToUsers.getAggregatedPermissions();
                resultMetadata.addAll(linksToMetadata(links));
            }
        }

        return new SharedResourcesResponse(resultMetadata);
    }
Returns list of resources shared by user.

@param bucket   - user bucket
@param location - storage location
@param request  - request body
@return list of shared with user resources
server/src/main/java/com/epam/aidial/core/server/service/ShareService.java