// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Agents.AI.Purview.Models.Common;
using Microsoft.Agents.AI.Purview.Models.Requests;
using Microsoft.Agents.AI.Purview.Models.Responses;
namespace Microsoft.Agents.AI.Purview;
///
/// Defines methods for interacting with the Purview service, including content processing,
/// protection scope management, and activity tracking.
///
/// This interface provides methods to interact with various Purview APIs. It includes processing content, managing protection
/// scopes, and sending content activity data. Implementations of this interface are expected to handle communication
/// with the Purview service and manage any necessary authentication or error handling.
internal interface IPurviewClient
{
///
/// Get user info from auth token.
///
/// The cancellation token used to cancel async processing.
/// The default tenant id used to retrieve the token and its info.
/// The token info from the token.
/// Throw if the token was invalid or could not be retrieved.
Task GetUserInfoFromTokenAsync(CancellationToken cancellationToken, string? tenantId = default);
///
/// Call ProcessContent API.
///
/// The request containing the content to process.
/// The cancellation token used to cancel async processing.
/// The response from the Purview API.
/// Thrown for validation, auth, and network errors.
Task ProcessContentAsync(ProcessContentRequest request, CancellationToken cancellationToken);
///
/// Call user ProtectionScope API.
///
/// The request containing the protection scopes metadata.
/// The cancellation token used to cancel async processing.
/// The protection scopes that apply to the data sent in the request.
/// Thrown for validation, auth, and network errors.
Task GetProtectionScopesAsync(ProtectionScopesRequest request, CancellationToken cancellationToken);
///
/// Call contentActivities API.
///
/// The request containing the content metadata. Used to generate interaction records.
/// The cancellation token used to cancel async processing.
/// The response from the Purview API.
/// Thrown for validation, auth, and network errors.
Task SendContentActivitiesAsync(ContentActivitiesRequest request, CancellationToken cancellationToken);
}