Initial QMAX production app
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
namespace QMax.Api.Contracts;
|
||||
|
||||
public sealed record AppUpdateManifestDto(
|
||||
string Slug,
|
||||
string Name,
|
||||
string Version,
|
||||
int AndroidVersionCode,
|
||||
string Channel,
|
||||
string Platform,
|
||||
string PackageKind,
|
||||
string DownloadPath,
|
||||
long PackageSizeBytes,
|
||||
string Sha256,
|
||||
string Notes,
|
||||
DateTimeOffset PublishedAt);
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace QMax.Api.Contracts;
|
||||
|
||||
public sealed record DeviceLoginRequest(string PairingCode, string DeviceName);
|
||||
public sealed record RefreshTokenRequest(string RefreshToken);
|
||||
public sealed record AuthResponse(string AccessToken, string RefreshToken, DateTimeOffset ExpiresAt, UserDto User);
|
||||
public sealed record UserDto(Guid Id, string DisplayName, string? PhoneNumber, string? AvatarPath);
|
||||
public sealed record SessionDto(Guid Id, string DeviceName, DateTimeOffset CreatedAt, DateTimeOffset LastSeenAt, DateTimeOffset ExpiresAt, bool IsCurrent);
|
||||
@@ -0,0 +1,53 @@
|
||||
using QMax.Api.Data.Entities;
|
||||
|
||||
namespace QMax.Api.Contracts;
|
||||
|
||||
public sealed record ChatDto(
|
||||
Guid Id,
|
||||
string? ExternalId,
|
||||
ChatKind Kind,
|
||||
string Title,
|
||||
string? AvatarUrl,
|
||||
string? LastMessagePreview,
|
||||
DateTimeOffset? LastMessageAt,
|
||||
int UnreadCount,
|
||||
bool IsPinned,
|
||||
bool IsMuted,
|
||||
bool IsArchived);
|
||||
|
||||
public sealed record MessageDto(
|
||||
Guid Id,
|
||||
Guid ChatId,
|
||||
string? ExternalId,
|
||||
string? SenderName,
|
||||
MessageDirection Direction,
|
||||
string? Text,
|
||||
DateTimeOffset SentAt,
|
||||
DateTimeOffset? EditedAt,
|
||||
DateTimeOffset? DeletedAt,
|
||||
Guid? ReplyToMessageId,
|
||||
string? ForwardedFrom,
|
||||
MessageDeliveryState DeliveryState,
|
||||
string? Error,
|
||||
IReadOnlyList<ReactionDto> Reactions,
|
||||
IReadOnlyList<AttachmentDto> Attachments);
|
||||
|
||||
public sealed record ReactionDto(string Emoji, int Count, bool ReactedByMe);
|
||||
|
||||
public sealed record AttachmentDto(
|
||||
Guid Id,
|
||||
string FileName,
|
||||
string ContentType,
|
||||
long FileSizeBytes,
|
||||
string DownloadPath,
|
||||
AttachmentKind Kind,
|
||||
int SortOrder);
|
||||
|
||||
public sealed record SendMessageRequest(string Text, Guid? ReplyToMessageId = null);
|
||||
public sealed record EditMessageRequest(string Text);
|
||||
public sealed record ForwardMessageRequest(Guid TargetChatId);
|
||||
public sealed record SetReactionRequest(string Emoji);
|
||||
public sealed record MessageDeletedDto(Guid ChatId, Guid MessageId);
|
||||
public sealed record CreateDirectChatRequest(string ExternalChatId, string Title, string? AvatarUrl = null);
|
||||
|
||||
public sealed record ChatPresenceDto(bool IsTyping, string? StatusText, DateTimeOffset UpdatedAt);
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace QMax.Api.Contracts;
|
||||
|
||||
public sealed record BeginMaxLoginRequest(string? PhoneNumber);
|
||||
public sealed record SubmitMaxCodeRequest(string Code);
|
||||
public sealed record MaxBridgeStatusDto(
|
||||
string Mode,
|
||||
bool IsAuthorized,
|
||||
string? LoginStage,
|
||||
string Status,
|
||||
string? Url,
|
||||
string? Title,
|
||||
string? LastError,
|
||||
DateTimeOffset UpdatedAt);
|
||||
|
||||
public sealed record MaxBrowserSnapshotDto(
|
||||
string? Url,
|
||||
string? Title,
|
||||
string BodyText,
|
||||
string ScreenshotPngBase64,
|
||||
DateTimeOffset CapturedAt);
|
||||
Reference in New Issue
Block a user