using System.Text.Json; using System.Text.Json.Serialization; namespace RblxTool.Models; [JsonSourceGenerationOptions( GenerationMode = JsonSourceGenerationMode.Default, PropertyNameCaseInsensitive = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] [JsonSerializable(typeof(Envelope>))] [JsonSerializable(typeof(Envelope))] [JsonSerializable(typeof(Envelope))] [JsonSerializable(typeof(Envelope))] [JsonSerializable(typeof(Envelope))] [JsonSerializable(typeof(Envelope))] [JsonSerializable(typeof(Envelope))] [JsonSerializable(typeof(JobPoll))] [JsonSerializable(typeof(JobEvent))] [JsonSerializable(typeof(LoginResult))] [JsonSerializable(typeof(OauthUrlResult))] [JsonSerializable(typeof(SweepRequest))] [JsonSerializable(typeof(SnipeRequest))] [JsonSerializable(typeof(HuntRequest))] [JsonSerializable(typeof(OauthRequest))] public sealed partial class ToolJsonContext : JsonSerializerContext { } public sealed class SweepRequest { [JsonPropertyName("maxPrice")] public ulong MaxPrice { get; set; } [JsonPropertyName("buy")] public bool Buy { get; set; } = true; [JsonPropertyName("dryRun")] public bool DryRun { get; set; } [JsonPropertyName("skipOwned")] public bool SkipOwned { get; set; } = true; [JsonPropertyName("pages")] public int Pages { get; set; } = 64; [JsonPropertyName("scanThreads")] public int ScanThreads { get; set; } = 8; [JsonPropertyName("detailThreads")] public int DetailThreads { get; set; } = 6; [JsonPropertyName("buyThreads")] public int BuyThreads { get; set; } = 3; [JsonPropertyName("limit")] public int Limit { get; set; } [JsonPropertyName("includeCollectibles")] public bool IncludeCollectibles { get; set; } = true; [JsonPropertyName("categories")] public List? Categories { get; set; } } public sealed class CategoryStream { [JsonPropertyName("category")] public string Category { get; set; } = string.Empty; [JsonPropertyName("subcategory")] public string? Subcategory { get; set; } } public sealed class SnipeRequest { [JsonPropertyName("targets")] public List Targets { get; set; } = new(); [JsonPropertyName("intervalMs")] public ulong IntervalMs { get; set; } = 750; [JsonPropertyName("threads")] public int Threads { get; set; } = 6; [JsonPropertyName("buy")] public bool Buy { get; set; } = true; [JsonPropertyName("dryRun")] public bool DryRun { get; set; } [JsonPropertyName("limit")] public int Limit { get; set; } [JsonPropertyName("watchReleases")] public bool WatchReleases { get; set; } [JsonPropertyName("releaseMaxPrice")] public ulong ReleaseMaxPrice { get; set; } [JsonPropertyName("releaseIntervalMs")] public ulong ReleaseIntervalMs { get; set; } = 2000; } public sealed class SnipeTargetRequest { [JsonPropertyName("assetId")] public ulong AssetId { get; set; } [JsonPropertyName("collectibleItemId")] public string? CollectibleItemId { get; set; } [JsonPropertyName("maxPrice")] public ulong MaxPrice { get; set; } [JsonPropertyName("underRap")] public double? UnderRap { get; set; } } public sealed class HuntRequest { [JsonPropertyName("start")] public ulong Start { get; set; } = 1; [JsonPropertyName("end")] public ulong End { get; set; } = 200000; [JsonPropertyName("threads")] public int Threads { get; set; } = 12; [JsonPropertyName("minMembers")] public ulong MinMembers { get; set; } = 1; [JsonPropertyName("requirePublicEntry")] public bool RequirePublicEntry { get; set; } = true; [JsonPropertyName("enrich")] public bool Enrich { get; set; } = true; [JsonPropertyName("claim")] public bool Claim { get; set; } [JsonPropertyName("limit")] public int Limit { get; set; } } public sealed class OauthRequest { [JsonPropertyName("clientId")] public string ClientId { get; set; } = string.Empty; [JsonPropertyName("clientSecret")] public string? ClientSecret { get; set; } [JsonPropertyName("redirectUri")] public string RedirectUri { get; set; } = "http://localhost:8790/callback"; [JsonPropertyName("scopes")] public string Scopes { get; set; } = "openid profile"; }