Initial commit

This commit is contained in:
2026-05-25 17:21:51 -07:00
commit eb27d44cbf
26 changed files with 1003 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
using Radium.DataExporter.Models.Accounts.Enums;
using Radium.DataExporter.Models.Common.Enums;
using System.Text.Json.Serialization;
namespace Radium.DataExporter.Models.Accounts;
public class Account
{
[JsonPropertyName(name: "accountId")] public long AccountId { get; set; }
[JsonPropertyName(name: "username")] public string Username { get; set; } = string.Empty;
[JsonPropertyName(name: "displayName")] public string DisplayName { get; set; } = string.Empty;
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName(name: "displayEmoji")] public string? DisplayEmoji { get; set; }
[JsonPropertyName(name: "profileImage")] public string ProfileImage { get; set; } = "DefaultProfileImage";
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName(name: "bannerImage")] public string? BannerImage { get; set; }
[JsonPropertyName(name: "isJunior")] public bool? IsJunior { get; set; }
[JsonPropertyName(name: "platforms")] public PlatformMask Platforms { get; set; }
[JsonPropertyName(name: "personalPronouns")] public PersonalPronouns PersonalPronouns { get; set; }
[JsonPropertyName(name: "identityFlags")] public IdentityFlags IdentityFlags { get; set; }
[JsonPropertyName(name: "createdAt")] public DateTime CreatedAt { get; set; }
[JsonPropertyName(name: "isMetaPlatformBlocked")] public bool IsMetaPlatformBlocked { get; set; }
}

View File

@@ -0,0 +1,17 @@
namespace Radium.DataExporter.Models.Accounts.Enums;
[Flags]
public enum IdentityFlags
{
None = 0,
LGBTQIA = 1,
Transgender = 2,
Bisexual = 4,
Lesbian = 8,
Pansexual = 16,
Asexual = 32,
Intersex = 64,
Genderqueer = 128,
Nonbinary = 256,
Aromantic = 512
}

View File

@@ -0,0 +1,13 @@
namespace Radium.DataExporter.Models.Accounts.Enums;
[Flags]
public enum PersonalPronouns
{
None = 0,
SheHer = 1,
HeHim = 2,
TheyThem = 4,
ZeHir = 8,
ZeZir = 16,
XeXem = 32
}

View File

@@ -0,0 +1,16 @@
using Radium.DataExporter.Models.Common.Enums;
using System.Text.Json.Serialization;
namespace Radium.DataExporter.Models.Authentication;
public class CachedLogin
{
[JsonPropertyName(name: "platform")] public PlatformType Platform { get; set; }
[JsonPropertyName(name: "platformId")] public string PlatformId { get; set; } = string.Empty;
[JsonPropertyName(name: "accountId")] public long AccountId { get; set; }
[JsonPropertyName(name: "lastLoginTime")] public DateTime LastLoginTime { get; set; } = DateTime.UtcNow;
[JsonPropertyName(name: "requirePassword")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public bool RequirePassword { get; set; } = false;
}

View File

@@ -0,0 +1,18 @@
namespace Radium.DataExporter.Models.Common.Enums;
[Flags]
public enum PlatformMask
{
None,
Steam,
Oculus,
PlayStation = 4,
Xbox = 8,
RecNet = 16,
IOS = 32,
GooglePlay = 64,
Standalone = 128,
Pico = 256,
Switch = 512,
All = -1
}

View File

@@ -0,0 +1,16 @@
namespace Radium.DataExporter.Models.Common.Enums;
public enum PlatformType
{
All = -1,
Steam,
Oculus,
PlayStation,
Xbox,
RecNet,
IOS,
GooglePlay,
Standalone,
Pico,
Switch
}

View File

@@ -0,0 +1,9 @@
namespace Radium.DataExporter.Models.Common.Requests;
public class CompleteAuthLinkRequest
{
public required string Code { get; set; }
public required long AccountId { get; set; }
public required string SteamId { get; set; }
public required string SteamTicket { get; set; }
}

View File

@@ -0,0 +1,10 @@
using System.Text.Json.Serialization;
namespace Radium.DataExporter.Models.Common.Results;
public class CompleteAuthLinkResult
{
[JsonPropertyName(name: "jobId")] public Guid JobId { get; set; }
[JsonPropertyName(name: "recNetUserId")] public long RecNetUserId { get; set; }
[JsonPropertyName(name: "resumedExistingJob")] public bool ResumedExistingJob { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace Radium.DataExporter.Models.Common.Results;
public class CreateJobSessionResponse
{
public CompleteAuthLinkResult? Result { get; init; }
public RecNetError? Error { get; init; }
public bool IsSuccess => Result != null;
}

View File

@@ -0,0 +1,22 @@
using System.Net;
using System.Text.Json.Serialization;
namespace Radium.DataExporter.Models.Common.Results;
public class RecNetError
{
[JsonPropertyName("type")]
public Uri? Type { get; init; }
[JsonPropertyName("title")]
public string Title { get; init; } = string.Empty;
[JsonPropertyName("status")]
public HttpStatusCode Status { get; init; }
[JsonPropertyName("detail")]
public string Detail { get; init; } = string.Empty;
[JsonPropertyName("traceId")]
public string TraceId { get; init; } = string.Empty;
}

View File

@@ -0,0 +1,18 @@
using Radium.DataExporter.Models.Accounts;
using Radium.DataExporter.Models.Authentication;
using Radium.DataExporter.Models.Common.Requests;
using Radium.DataExporter.Models.Common.Results;
using System.Text.Json.Serialization;
namespace Radium.DataExporter.Models.JsonContext;
[JsonSerializable(typeof(CompleteAuthLinkRequest))]
[JsonSerializable(typeof(CompleteAuthLinkResult))]
[JsonSerializable(typeof(List<CachedLogin>))]
[JsonSerializable(typeof(CachedLogin))]
[JsonSerializable(typeof(List<Account>))]
[JsonSerializable(typeof(Account))]
[JsonSerializable(typeof(RecNetError))]
public partial class RecNetJsonContext : JsonSerializerContext
{
}

View File

@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>