forked from xiongyuxing/tiku-backend.net
feat: migrate direct tenant content and learning endpoints
This commit is contained in:
@@ -36,6 +36,37 @@ public sealed record AssetUploadConfirmCommand(
|
||||
long? FileSizeBytes,
|
||||
string? ChecksumSha256);
|
||||
|
||||
public sealed record UpsertAssetCommand(
|
||||
Guid? AssetId,
|
||||
Guid? RegionId,
|
||||
Guid? SubjectId,
|
||||
Guid? CategoryId,
|
||||
Guid? ContentNodeId,
|
||||
string? LegacyId,
|
||||
string? AssetKey,
|
||||
string? Title,
|
||||
string? Category,
|
||||
string? Description,
|
||||
string? FileName,
|
||||
string? CdnUrl,
|
||||
bool? IsPublic,
|
||||
string? AssetType,
|
||||
string? Visibility,
|
||||
string? Status,
|
||||
string? Provider,
|
||||
string? Bucket,
|
||||
string? ObjectKey,
|
||||
string? MimeType,
|
||||
long? FileSizeBytes,
|
||||
string? ChecksumSha256,
|
||||
string? PreviewUrl,
|
||||
string? PreviewObjectKey,
|
||||
int? Order,
|
||||
JsonElement AccessRules,
|
||||
JsonElement Metadata);
|
||||
|
||||
public sealed record AssetAccessSignCommand(Guid AssetId, int? ExpiresInSeconds);
|
||||
|
||||
public sealed record AssetManagementFilter(
|
||||
Guid? RegionId = null,
|
||||
Guid? SubjectId = null,
|
||||
@@ -54,6 +85,8 @@ public sealed record ImportJobFilter(
|
||||
string? SourceFormat = null,
|
||||
int? Limit = null);
|
||||
|
||||
public sealed record AssetEventFilter(Guid? AssetId = null, Guid? UserId = null, int? Limit = null);
|
||||
|
||||
public sealed record ContentAssetManagementItem(
|
||||
Guid Id,
|
||||
string? LegacyId,
|
||||
@@ -96,6 +129,39 @@ public sealed record AssetUploadConfirmResult(
|
||||
ContentAssetManagementItem Item,
|
||||
ObjectStorageMetadata Metadata);
|
||||
|
||||
public sealed record AssetManagementSignedAccessResult(
|
||||
ContentAssetManagementItem Item,
|
||||
ObjectStorageSignedUrl Url);
|
||||
|
||||
public sealed record ContentAssetAccessEventItem(
|
||||
Guid Id,
|
||||
Guid? AssetId,
|
||||
Guid? UserId,
|
||||
AssetAccessActorRole ActorRole,
|
||||
AssetAccessType AccessType,
|
||||
string? Visibility,
|
||||
string? AssetType,
|
||||
string? StorageProvider,
|
||||
AssetAccessDisposition? Disposition,
|
||||
int? ExpiresInSeconds,
|
||||
string? SignatureMode,
|
||||
AssetAccessResult Result,
|
||||
string? DenyCode,
|
||||
string? IpAddress,
|
||||
string? UserAgent,
|
||||
JsonElement Metadata,
|
||||
DateTimeOffset CreatedAt);
|
||||
|
||||
public sealed record ContentAssetSecurityScanEventItem(
|
||||
Guid Id,
|
||||
Guid? AssetId,
|
||||
string Provider,
|
||||
AssetSecurityScanStatus ScanStatus,
|
||||
AssetSecurityRiskLevel RiskLevel,
|
||||
string[] IssueCodes,
|
||||
JsonElement Details,
|
||||
DateTimeOffset CreatedAt);
|
||||
|
||||
public sealed record ContentImportJobItem(
|
||||
Guid Id,
|
||||
Guid? TargetRegionId,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Tiku.Application.Catalog;
|
||||
using Tiku.Application.Content;
|
||||
|
||||
namespace Tiku.Application.Assets;
|
||||
|
||||
@@ -9,6 +10,11 @@ public interface IAssetManagementService
|
||||
AssetManagementFilter filter,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
Task<ContentManagementResult<ContentAssetManagementItem>> UpsertAssetAsync(
|
||||
AssetManagementActor actor,
|
||||
UpsertAssetCommand command,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
Task<AssetUploadSignResult> SignUploadAsync(
|
||||
AssetManagementActor actor,
|
||||
AssetUploadSignCommand command,
|
||||
@@ -19,6 +25,26 @@ public interface IAssetManagementService
|
||||
AssetUploadConfirmCommand command,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
Task<AssetManagementSignedAccessResult> SignDownloadAsync(
|
||||
AssetManagementActor actor,
|
||||
AssetAccessSignCommand command,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
Task<AssetManagementSignedAccessResult> SignPreviewAsync(
|
||||
AssetManagementActor actor,
|
||||
AssetAccessSignCommand command,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
Task<CatalogList<ContentAssetAccessEventItem>> GetAccessEventsAsync(
|
||||
AssetManagementActor actor,
|
||||
AssetEventFilter filter,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
Task<CatalogList<ContentAssetSecurityScanEventItem>> GetSecurityScanEventsAsync(
|
||||
AssetManagementActor actor,
|
||||
AssetEventFilter filter,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
Task<CatalogList<ContentImportJobItem>> GetImportJobsAsync(
|
||||
AssetManagementActor actor,
|
||||
ImportJobFilter filter,
|
||||
|
||||
Reference in New Issue
Block a user