IConnectorManagedContent.cs•5.61 kB
using Api.DigitalPages.Interfaces.Models;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Api.DigitalPages.Interfaces.Connector
{
/// <summary>
/// Manipulador de conteúdo gerenciado
/// </summary>
public interface IConnectorManagedContent :
ISystemConnectorBaseCrudFlowV2<IContentGroup, ContentGroupOptions>,
ISystemConnectorBaseCrudFlowV2<IContentGroupReference, IContentGroup, ContentReferenceOptions>,
ISystemConnectorBaseCrudFlowV2<IContentGroupReferenceProduct, IContentGroupReference, ContentGroupReferenceProductOptions>,
ISystemConnectorBaseCrudFlowV2<IContentGroupReferenceAuthorization, IContentGroupReference, ContentReferenceAuthorizationOptions>,
ISystemConnectorBaseCrudFlowV2<IContentGroupReferenceInteraction, IContentGroupReference, ContentReferenceInteractionOptions>,
ISystemConnectorBaseCrudFlowV2<IContentGroupInsightRegister, IContentGroup, ContentInsightRegistersOptions>,
ISystemConnectorBasePagedFlow<IContentGroup, ContentGroupOptions>,
ISystemConnectorBasePagedFlow<IContentGroup, ContentReferenceInteractionOptions>,
IConnectorContentEvaluation
{
/// <summary>
/// Formatos entregues preferêncialmente para os thumbs.
/// </summary>
List<string> AutoThumbPreferencesMimetype { get; set; }
/// <summary>
/// Período que deve ser utilizado para a entrega de insights relacionados ao conteúdo.
/// </summary>
TimeSpan? InsightsPeriod { get; set; }
/// <summary>
/// Duração minima entregue por uma interação para ser aceito.
/// </summary>
TimeSpan? MinInteractionDurationRequired { get; set; }
/// <summary>
/// Duração máxima entregue por uma interação para ser aceito.
/// </summary>
TimeSpan? MaxInteractionDurationRequired { get; set; }
}
public interface IConnectorManagedContentV2 :
IConnectorManagedContent,
ISystemBaseCatalog<IContentCatalog, IContentGroupReferenceV2, IContentCatalogAuthorization, ContentCatalogOptions>,
ISystemConnectorBaseCrudFlowV2<IContentCatalogAuthorization, IContentCatalog, ContentCatalogAuthorizationOptions>
{
}
public class ContentCatalogOptions : IBaseCrudOptions
{
public bool IncludeReferences { get; set; }
public bool IncludeAuthorizations { get; set; }
}
public class ContentCatalogAuthorizationOptions : IBaseCrudOptions
{
public bool IncludeReferences { get; set; }
}
public class AuthorizationFilter : IBaseAuthorizationFilter
{
public List<Guid> Directories { get; set; }
public List<Guid> Projects { get; set; }
public List<Guid> Entities { get; set; }
public List<Guid> Users { get; set; }
public bool OnlyToAnonymousUser { get; set; }
public List<Guid> Products { get; set; }
}
public class ContentGroupOptions : IBaseCrudOptions
{
public List<Guid> FilterExistAnyEntities { get; set; }
public List<Guid> FilterExistAllEntities { get; set; }
public string FilterTexts { get; set; }
public IBaseAuthorizationFilter FilterAuthorizations { get; set; }
public Guid? FilterNotAccessedFromUser { get; set; }
public List<Guid> FilterCatalogs { get; set; }
public bool IncludeProperties { get; set; }
public bool IncludeEntities { get; set; }
public bool IncludeReferences { get; set; }
public bool IncludeReferenceProducts { get; set; }
public bool IncludeReferenceAuthorizations { get; set; }
public bool IncludeInsights { get; set; }
public List<Guid> ExcludeContents { get; set; }
public OrderType? OrderInterests { get; set; }
public OrderType? OrderConsumption { get; set; }
}
public enum OrderType
{
Asc,
Desc
}
public class ContentGroupReferenceProductOptions : IBaseCrudOptions
{
}
public class ContentReferenceOptions : IBaseCrudOptions
{
public IBaseAuthorizationFilter FilterAuthorizations { get; set; }
public List<Guid> FilterCatalogs { get; set; }
public bool IncludeProducts { get; set; }
public bool IncludeAuthorizations { get; set; }
public bool IncludeParent { get; set; }
public bool IncludeParentInsights { get; set; }
public bool IncludeCatalogs { get; set; }
}
public class ContentInsightRegistersOptions : IBaseCrudOptions
{
public List<Guid> FilterUser { get; set; }
public List<InsightsRegisterType> FilterRegisterType { get; set; }
public TimeSpan? FilterPeriod { get; set; }
}
public class ContentReferenceAuthorizationOptions : IBaseCrudOptions
{
public bool IncludeReferences { get; set; }
}
public class ContentReferenceInteractionOptions : IBaseCrudOptions
{
public Guid? FilterUserUid { get; set; }
public Guid? FilterReferenceUid { get; set; }
public Guid? FilterGroupUid { get; set; }
public bool IncludeReference { get; set; }
public bool IncludeGroup { get; set; }
public bool IncludeGroupProperties { get; set; }
public bool IncludeGroupEntities { get; set; }
public OrderType? OrderType { get; set; }
public IBaseAuthorizationFilter FilterAuthorizations { get; set; }
}
}