Initial commit: NexusArchitect Professional Workstation Overhaul
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using FluentResults;
|
||||
using MediatR;
|
||||
|
||||
namespace NexusReader.Application.Abstractions.Messaging;
|
||||
|
||||
public interface ICommand : IRequest<Result>
|
||||
{
|
||||
}
|
||||
|
||||
public interface ICommand<TResponse> : IRequest<Result<TResponse>>
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using FluentResults;
|
||||
using MediatR;
|
||||
|
||||
namespace NexusReader.Application.Abstractions.Messaging;
|
||||
|
||||
public interface ICommandHandler<TCommand> : IRequestHandler<TCommand, Result>
|
||||
where TCommand : ICommand
|
||||
{
|
||||
}
|
||||
|
||||
public interface ICommandHandler<TCommand, TResponse> : IRequestHandler<TCommand, Result<TResponse>>
|
||||
where TCommand : ICommand<TResponse>
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using FluentResults;
|
||||
using MediatR;
|
||||
|
||||
namespace NexusReader.Application.Abstractions.Messaging;
|
||||
|
||||
public interface IQuery<TResponse> : IRequest<Result<TResponse>>
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using FluentResults;
|
||||
using MediatR;
|
||||
|
||||
namespace NexusReader.Application.Abstractions.Messaging;
|
||||
|
||||
public interface IQueryHandler<TQuery, TResponse> : IRequestHandler<TQuery, Result<TResponse>>
|
||||
where TQuery : IQuery<TResponse>
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using FluentResults;
|
||||
using NexusReader.Application.Queries.Quiz;
|
||||
|
||||
namespace NexusReader.Application.Abstractions.Services;
|
||||
|
||||
public interface IAiGenerateQuizService
|
||||
{
|
||||
Task<Result<QuizDto>> GenerateQuizAsync(string contextBlockId, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using FluentResults;
|
||||
|
||||
namespace NexusReader.Application.Abstractions.Services;
|
||||
|
||||
public interface INativeStorageService
|
||||
{
|
||||
Result SaveString(string key, string value);
|
||||
Result<string?> GetString(string key);
|
||||
Result SaveBool(string key, bool value);
|
||||
Result<bool> GetBool(string key, bool defaultValue = false);
|
||||
Result Remove(string key);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using FluentResults;
|
||||
|
||||
namespace NexusReader.Application.Abstractions.Services;
|
||||
|
||||
public interface IPlatformService
|
||||
{
|
||||
Task<Result> VibrateSuccessAsync();
|
||||
Task<Result> VibrateErrorAsync();
|
||||
Task<Result> VibrateAsync(int milliseconds);
|
||||
Result<DeviceContext> GetDeviceContext();
|
||||
}
|
||||
|
||||
public record DeviceContext(
|
||||
string Model,
|
||||
string Manufacturer,
|
||||
DeviceType DeviceType,
|
||||
DisplayOrientation Orientation
|
||||
);
|
||||
|
||||
public enum DeviceType
|
||||
{
|
||||
Unknown,
|
||||
Phone,
|
||||
Tablet,
|
||||
Desktop
|
||||
}
|
||||
|
||||
public enum DisplayOrientation
|
||||
{
|
||||
Unknown,
|
||||
Portrait,
|
||||
Landscape
|
||||
}
|
||||
Reference in New Issue
Block a user