diff --git a/.gitignore b/.gitignore index bb79fbf7e..c1a78e412 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,6 @@ bun.lock # optional generated outputs from schema.js schemas_orig/ schemas_nested/ -schemas_final/ \ No newline at end of file +schemas_final/ + +!/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/wwwroot/lib/bootstrap/dist/ \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c52fdde44..dfbf2c4a5 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -55,9 +55,10 @@ "Node.js.Server.ts.executor": "Debug", "RunOnceActivity.ShowReadmeOnStart": "true", "RunOnceActivity.git.unshallow": "true", + "git-widget-placeholder": "master", "javascript.nodejs.core.library.configured.version": "24.8.0", "javascript.nodejs.core.library.typings.version": "24.7.0", - "last_opened_file_path": "/home/Rory/git/spacebar/server-master/src/util/migration/postgres", + "last_opened_file_path": "/home/Rory/git/spacebar/server-master/src/schemas/api/users", "node.js.detected.package.eslint": "true", "node.js.detected.package.standard": "true", "node.js.selected.package.eslint": "(autodetect)", @@ -71,7 +72,7 @@ "npm.build.executor": "Run", "npm.start.executor": "Debug", "prettierjs.PrettierConfiguration.Package": "/home/Rory/git/spacebar/server-master/node_modules/prettier", - "settings.editor.selected.configurable": "preferences.sourceCode", + "settings.editor.selected.configurable": "com.github.copilot.settings.customInstructions.CopilotInstructionsConfigurable", "ts.external.directory.path": "/home/Rory/git/spacebar/server-master/node_modules/typescript/lib" }, "keyToStringList": { @@ -87,11 +88,11 @@ }]]> - - - - + + + + @@ -161,7 +162,9 @@ - + + + diff --git a/assets/openapi.json b/assets/openapi.json index e502af61c..83138115d 100644 Binary files a/assets/openapi.json and b/assets/openapi.json differ diff --git a/assets/schemas.json b/assets/schemas.json index d5b4835ef..4bf97dc42 100644 Binary files a/assets/schemas.json and b/assets/schemas.json differ diff --git a/extra/admin-api/.gitignore b/extra/admin-api/.gitignore index f4e4961b6..65497125b 100644 --- a/extra/admin-api/.gitignore +++ b/extra/admin-api/.gitignore @@ -6,4 +6,4 @@ appsettings.Local*.json /*.patch Spacebar.Db/**/*.orig -Spacebar.Db/**/*.rej +Spacebar.Db/**/*.rej \ No newline at end of file diff --git a/extra/admin-api/ConfigTest/ConfigTest.csproj b/extra/admin-api/ConfigTest/ConfigTest.csproj new file mode 100644 index 000000000..7244b6736 --- /dev/null +++ b/extra/admin-api/ConfigTest/ConfigTest.csproj @@ -0,0 +1,20 @@ + + + + net10.0 + enable + enable + dotnet-ConfigTest-18d89c0e-df5d-447b-8429-7d526a35ab13 + + + + + + + + + + + + + diff --git a/extra/admin-api/ConfigTest/Program.cs b/extra/admin-api/ConfigTest/Program.cs new file mode 100644 index 000000000..5945bcf62 --- /dev/null +++ b/extra/admin-api/ConfigTest/Program.cs @@ -0,0 +1,14 @@ +using ConfigTest; +using Microsoft.EntityFrameworkCore; +using Spacebar.Db.Contexts; + +var builder = Host.CreateApplicationBuilder(args); +builder.Services.AddHostedService(); +builder.Services.AddDbContext(options => { + options + .UseNpgsql(builder.Configuration.GetConnectionString("Spacebar")) + .EnableDetailedErrors(); +}, ServiceLifetime.Singleton); + +var host = builder.Build(); +host.Run(); diff --git a/extra/admin-api/ConfigTest/Properties/launchSettings.json b/extra/admin-api/ConfigTest/Properties/launchSettings.json new file mode 100644 index 000000000..c355f360c --- /dev/null +++ b/extra/admin-api/ConfigTest/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "ConfigTest": { + "commandName": "Project", + "dotnetRunMessages": true, + "environmentVariables": { + "DOTNET_ENVIRONMENT": "Development" + } + } + } +} diff --git a/extra/admin-api/ConfigTest/Worker.cs b/extra/admin-api/ConfigTest/Worker.cs new file mode 100644 index 000000000..dd3ef7791 --- /dev/null +++ b/extra/admin-api/ConfigTest/Worker.cs @@ -0,0 +1,43 @@ +using System.Text.Json.Nodes; +using Spacebar.ConfigModel.Extensions; +using Spacebar.Db.Contexts; + +namespace ConfigTest; + +public class Worker(ILogger logger, SpacebarDbContext db) : BackgroundService +{ + protected override async Task ExecuteAsync(CancellationToken stoppingToken) + { + var config = db.Configs + .OrderBy(x => x.Key) + .ToDictionary(x => x.Key, x => x.Value); + foreach (var (key, value) in config) + { + Console.WriteLine("Config Key: {0}, Value: {1}", key, value ?? "[NULL]"); + } + + var readConfig = config.ToNestedJsonObject(); + Console.WriteLine(readConfig); + var mapped = readConfig.ToFlatKv(); + foreach (var (key, value) in mapped) + { + Console.WriteLine("Mapped Key: {0}, Value: {1}", key, value ?? "[NULL]"); + } + + // check that they're equal + foreach (var (key, value) in config) + { + if (!mapped.ContainsKey(key)) + { + Console.WriteLine("Missing Key in Mapped: {0}", key); + continue; + } + + if (mapped[key] != value) + { + Console.WriteLine("Value Mismatch for Key: {0}, Original: {1}, Mapped: {2}", key, value ?? "[NULL]", mapped[key] ?? "[NULL]"); + } + } + Environment.Exit(0); + } +} \ No newline at end of file diff --git a/extra/admin-api/Spacebar.AdminAPI/appsettings.Development.json b/extra/admin-api/ConfigTest/appsettings.Development.json similarity index 100% rename from extra/admin-api/Spacebar.AdminAPI/appsettings.Development.json rename to extra/admin-api/ConfigTest/appsettings.Development.json diff --git a/extra/admin-api/Spacebar.AdminAPI/appsettings.json b/extra/admin-api/ConfigTest/appsettings.json similarity index 100% rename from extra/admin-api/Spacebar.AdminAPI/appsettings.json rename to extra/admin-api/ConfigTest/appsettings.json diff --git a/extra/admin-api/Spacebar.AdminApi/Controllers/ConfigController.cs b/extra/admin-api/Spacebar.AdminApi/Controllers/ConfigController.cs new file mode 100644 index 000000000..964656169 --- /dev/null +++ b/extra/admin-api/Spacebar.AdminApi/Controllers/ConfigController.cs @@ -0,0 +1,61 @@ +using System.Text.Json.Nodes; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Spacebar.AdminApi.Extensions; +using Spacebar.AdminApi.Models; +using Spacebar.AdminApi.Services; +using Spacebar.Db.Contexts; +using Spacebar.Db.Models; +using Spacebar.RabbitMqUtilities; +using Spacebar.ConfigModel.Extensions; + +namespace Spacebar.AdminApi.Controllers; + +[ApiController] +[Route("/Configuration")] +public class ConfigController(ILogger logger, SpacebarDbContext db, RabbitMQService mq, IServiceProvider sp, AuthenticationService auth) : ControllerBase { + private readonly ILogger _logger = logger; + + [HttpGet] + public async Task Get() { + (await auth.GetCurrentUser(Request)).GetRights().AssertHasAllRights(SpacebarRights.Rights.OPERATOR); + + var config = (await db.Configs.AsNoTracking().ToDictionaryAsync(x => x.Key, x => x.Value)).ToNestedJsonObject(); + return config; + } + + [HttpPost] + public async Task Post([FromBody] JsonObject newConfig) { + (await auth.GetCurrentUser(Request)).GetRights().AssertHasAllRights(SpacebarRights.Rights.OPERATOR); + + var flatConfig = newConfig.ToFlatKv(); + var tasks = flatConfig.Select(async x => { + await using var scope = sp.CreateAsyncScope(); + var scopedDb = scope.ServiceProvider.GetRequiredService(); + var existingConfig = await scopedDb.Configs.FindAsync(x.Key); + if (existingConfig != null) { + existingConfig.Value = x.Value; + scopedDb.Configs.Update(existingConfig); + } + else { + await scopedDb.Configs.AddAsync(new Config + { Key = x.Key, Value = x.Value }); + } + + await scopedDb.SaveChangesAsync(); + }); + await Task.WhenAll(tasks); + // TODO: rabbitmq + + return Ok(); + } + + [HttpPost] + public async Task ReloadConfig() { + (await auth.GetCurrentUser(Request)).GetRights().AssertHasAllRights(SpacebarRights.Rights.OPERATOR); + + // TODO: rabbitmq + + return Ok(); + } +} \ No newline at end of file diff --git a/extra/admin-api/Spacebar.AdminAPI/Controllers/GuildController.cs b/extra/admin-api/Spacebar.AdminApi/Controllers/GuildController.cs similarity index 99% rename from extra/admin-api/Spacebar.AdminAPI/Controllers/GuildController.cs rename to extra/admin-api/Spacebar.AdminApi/Controllers/GuildController.cs index 03b38e64d..05bd604aa 100644 --- a/extra/admin-api/Spacebar.AdminAPI/Controllers/GuildController.cs +++ b/extra/admin-api/Spacebar.AdminApi/Controllers/GuildController.cs @@ -2,14 +2,14 @@ using ArcaneLibs.Extensions; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using RabbitMQ.Client; -using Spacebar.AdminAPI.Extensions; +using Spacebar.AdminApi.Extensions; using Spacebar.AdminApi.Models; -using Spacebar.AdminAPI.Services; +using Spacebar.AdminApi.Services; using Spacebar.Db.Contexts; using Spacebar.Db.Models; using Spacebar.RabbitMqUtilities; -namespace Spacebar.AdminAPI.Controllers; +namespace Spacebar.AdminApi.Controllers; [ApiController] [Route("/Guilds")] diff --git a/extra/admin-api/Spacebar.AdminAPI/Controllers/Media/UserMediaController.cs b/extra/admin-api/Spacebar.AdminApi/Controllers/Media/UserMediaController.cs similarity index 91% rename from extra/admin-api/Spacebar.AdminAPI/Controllers/Media/UserMediaController.cs rename to extra/admin-api/Spacebar.AdminApi/Controllers/Media/UserMediaController.cs index a4d915e5a..f3415731b 100644 --- a/extra/admin-api/Spacebar.AdminAPI/Controllers/Media/UserMediaController.cs +++ b/extra/admin-api/Spacebar.AdminApi/Controllers/Media/UserMediaController.cs @@ -1,13 +1,13 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -using Spacebar.AdminAPI.Extensions; +using Spacebar.AdminApi.Extensions; using Spacebar.AdminApi.Models; -using Spacebar.AdminAPI.Services; +using Spacebar.AdminApi.Services; using Spacebar.Db.Contexts; using Spacebar.Db.Models; using Spacebar.RabbitMqUtilities; -namespace Spacebar.AdminAPI.Controllers.Media; +namespace Spacebar.AdminApi.Controllers.Media; [ApiController] [Route("/media/user")] diff --git a/extra/admin-api/Spacebar.AdminAPI/Controllers/PingController.cs b/extra/admin-api/Spacebar.AdminApi/Controllers/PingController.cs similarity index 90% rename from extra/admin-api/Spacebar.AdminAPI/Controllers/PingController.cs rename to extra/admin-api/Spacebar.AdminApi/Controllers/PingController.cs index a2aceb504..05b6d8760 100644 --- a/extra/admin-api/Spacebar.AdminAPI/Controllers/PingController.cs +++ b/extra/admin-api/Spacebar.AdminApi/Controllers/PingController.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Mvc; -using Spacebar.AdminAPI.Services; +using Spacebar.AdminApi.Services; -namespace Spacebar.AdminAPI.Controllers; +namespace Spacebar.AdminApi.Controllers; [ApiController] [Route("/")] diff --git a/extra/admin-api/Spacebar.AdminAPI/Controllers/UserController.cs b/extra/admin-api/Spacebar.AdminApi/Controllers/UserController.cs similarity index 99% rename from extra/admin-api/Spacebar.AdminAPI/Controllers/UserController.cs rename to extra/admin-api/Spacebar.AdminApi/Controllers/UserController.cs index 436c0f91f..505f789e1 100644 --- a/extra/admin-api/Spacebar.AdminAPI/Controllers/UserController.cs +++ b/extra/admin-api/Spacebar.AdminApi/Controllers/UserController.cs @@ -4,14 +4,14 @@ using ArcaneLibs.Extensions; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using RabbitMQ.Client; -using Spacebar.AdminAPI.Extensions; +using Spacebar.AdminApi.Extensions; using Spacebar.AdminApi.Models; -using Spacebar.AdminAPI.Services; +using Spacebar.AdminApi.Services; using Spacebar.Db.Contexts; using Spacebar.Db.Models; using Spacebar.RabbitMqUtilities; -namespace Spacebar.AdminAPI.Controllers; +namespace Spacebar.AdminApi.Controllers; [ApiController] [Route("/users")] @@ -48,7 +48,7 @@ public class UserController(ILogger logger, Configuration config Disabled = x.Disabled, Deleted = x.Deleted, Email = x.Email, - Flags = ulong.Parse(x.Flags), + Flags = x.Flags, PublicFlags = x.PublicFlags, Rights = x.Rights, ApplicationBotUser = x.ApplicationBotUser == null ? null : new(), diff --git a/extra/admin-api/Spacebar.AdminAPI/Extensions/DbExtensions.cs b/extra/admin-api/Spacebar.AdminApi/Extensions/DbExtensions.cs similarity index 89% rename from extra/admin-api/Spacebar.AdminAPI/Extensions/DbExtensions.cs rename to extra/admin-api/Spacebar.AdminApi/Extensions/DbExtensions.cs index f6318e8f3..1220de913 100644 --- a/extra/admin-api/Spacebar.AdminAPI/Extensions/DbExtensions.cs +++ b/extra/admin-api/Spacebar.AdminApi/Extensions/DbExtensions.cs @@ -2,7 +2,7 @@ using Microsoft.EntityFrameworkCore; using Spacebar.AdminApi.Models; using Spacebar.Db.Models; -namespace Spacebar.AdminAPI.Extensions; +namespace Spacebar.AdminApi.Extensions; public static class DbExtensions { public static string? GetString(this DbSet config, string key) => config.Find(key)?.Value; diff --git a/extra/admin-api/Spacebar.AdminAPI/Middleware/AuthenticationMiddleware.cs b/extra/admin-api/Spacebar.AdminApi/Middleware/AuthenticationMiddleware.cs similarity index 97% rename from extra/admin-api/Spacebar.AdminAPI/Middleware/AuthenticationMiddleware.cs rename to extra/admin-api/Spacebar.AdminApi/Middleware/AuthenticationMiddleware.cs index dea89586c..a5144add5 100644 --- a/extra/admin-api/Spacebar.AdminAPI/Middleware/AuthenticationMiddleware.cs +++ b/extra/admin-api/Spacebar.AdminApi/Middleware/AuthenticationMiddleware.cs @@ -1,11 +1,11 @@ using System.IdentityModel.Tokens.Jwt; using System.Security.Cryptography; using Microsoft.IdentityModel.Tokens; -using Spacebar.AdminAPI.Services; +using Spacebar.AdminApi.Services; using Spacebar.Db.Contexts; using Spacebar.Db.Models; -namespace Spacebar.AdminAPI.Middleware; +namespace Spacebar.AdminApi.Middleware; public class AuthenticationMiddleware(RequestDelegate next) { private static Dictionary _userCache = new(); diff --git a/extra/admin-api/Spacebar.AdminAPI/Program.cs b/extra/admin-api/Spacebar.AdminApi/Program.cs similarity index 96% rename from extra/admin-api/Spacebar.AdminAPI/Program.cs rename to extra/admin-api/Spacebar.AdminApi/Program.cs index 93b28b15c..f3e977cbe 100644 --- a/extra/admin-api/Spacebar.AdminAPI/Program.cs +++ b/extra/admin-api/Spacebar.AdminApi/Program.cs @@ -1,8 +1,8 @@ using System.Text.Json.Serialization; using Microsoft.AspNetCore.Http.Timeouts; using Microsoft.EntityFrameworkCore; -using Spacebar.AdminAPI.Middleware; -using Spacebar.AdminAPI.Services; +using Spacebar.AdminApi.Middleware; +using Spacebar.AdminApi.Services; using Spacebar.Db.Contexts; using Spacebar.RabbitMqUtilities; diff --git a/extra/admin-api/Spacebar.AdminAPI/Properties/launchSettings.json b/extra/admin-api/Spacebar.AdminApi/Properties/launchSettings.json similarity index 100% rename from extra/admin-api/Spacebar.AdminAPI/Properties/launchSettings.json rename to extra/admin-api/Spacebar.AdminApi/Properties/launchSettings.json diff --git a/extra/admin-api/Spacebar.AdminAPI/Services/AuthenticationService.cs b/extra/admin-api/Spacebar.AdminApi/Services/AuthenticationService.cs similarity index 97% rename from extra/admin-api/Spacebar.AdminAPI/Services/AuthenticationService.cs rename to extra/admin-api/Spacebar.AdminApi/Services/AuthenticationService.cs index d402c5b96..788c8eb9a 100644 --- a/extra/admin-api/Spacebar.AdminAPI/Services/AuthenticationService.cs +++ b/extra/admin-api/Spacebar.AdminApi/Services/AuthenticationService.cs @@ -4,7 +4,7 @@ using Microsoft.IdentityModel.Tokens; using Spacebar.Db.Contexts; using Spacebar.Db.Models; -namespace Spacebar.AdminAPI.Services; +namespace Spacebar.AdminApi.Services; public class AuthenticationService(SpacebarDbContext db, Configuration config) { private static Dictionary _userCache = new(); diff --git a/extra/admin-api/Spacebar.AdminAPI/Services/Configuration.cs b/extra/admin-api/Spacebar.AdminApi/Services/Configuration.cs similarity index 89% rename from extra/admin-api/Spacebar.AdminAPI/Services/Configuration.cs rename to extra/admin-api/Spacebar.AdminApi/Services/Configuration.cs index a58ef5c07..f6b2c0291 100644 --- a/extra/admin-api/Spacebar.AdminAPI/Services/Configuration.cs +++ b/extra/admin-api/Spacebar.AdminApi/Services/Configuration.cs @@ -1,4 +1,4 @@ -namespace Spacebar.AdminAPI.Services; +namespace Spacebar.AdminApi.Services; public class Configuration { public Configuration(IConfiguration configuration) { diff --git a/extra/admin-api/Spacebar.AdminAPI/Spacebar.AdminAPI.csproj b/extra/admin-api/Spacebar.AdminApi/Spacebar.AdminApi.csproj similarity index 91% rename from extra/admin-api/Spacebar.AdminAPI/Spacebar.AdminAPI.csproj rename to extra/admin-api/Spacebar.AdminApi/Spacebar.AdminApi.csproj index 872e11882..950f8a1f8 100644 --- a/extra/admin-api/Spacebar.AdminAPI/Spacebar.AdminAPI.csproj +++ b/extra/admin-api/Spacebar.AdminApi/Spacebar.AdminApi.csproj @@ -16,6 +16,7 @@ + diff --git a/extra/admin-api/Spacebar.AdminApi/appsettings.Development.json b/extra/admin-api/Spacebar.AdminApi/appsettings.Development.json new file mode 100644 index 000000000..032457733 --- /dev/null +++ b/extra/admin-api/Spacebar.AdminApi/appsettings.Development.json @@ -0,0 +1,27 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Trace", //Warning + "Microsoft.AspNetCore.Mvc": "Warning", //Warning + "Microsoft.AspNetCore.HostFiltering": "Warning", //Warning + "Microsoft.AspNetCore.Cors": "Warning", //Warning + // "Microsoft.EntityFrameworkCore": "Warning" + "Microsoft.EntityFrameworkCore.Database.Command": "Debug" + } + }, + "ConnectionStrings": { + "Spacebar": "Host=127.0.0.1; Username=postgres; Database=spacebar; Port=5432; Include Error Detail=true; Maximum Pool Size=1000; Command Timeout=6000; Timeout=600;", + }, + "RabbitMQ": { + "Host": "127.0.0.1", + "Port": 5673, + "Username": "guest", + "Password": "guest" + }, + "SpacebarAdminApi": { + "Enforce2FA": true, + "OverrideUid": null, + "DisableAuthentication": false + } +} diff --git a/extra/admin-api/Spacebar.AdminApi/appsettings.json b/extra/admin-api/Spacebar.AdminApi/appsettings.json new file mode 100644 index 000000000..10f68b8c8 --- /dev/null +++ b/extra/admin-api/Spacebar.AdminApi/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/extra/admin-api/Spacebar.AdminApi/deps.json b/extra/admin-api/Spacebar.AdminApi/deps.json new file mode 100644 index 000000000..f1ddcb251 --- /dev/null +++ b/extra/admin-api/Spacebar.AdminApi/deps.json @@ -0,0 +1,447 @@ +[ + { + "pname": "ArcaneLibs", + "version": "1.0.0-preview.20251005-232225", + "hash": "sha256-EsYLSiyX5Nj+ZpFb6FOcAYqDsQFSbvgm9NKaarJjK/0=" + }, + { + "pname": "ArcaneLibs.StringNormalisation", + "version": "1.0.0-preview.20251005-232225", + "hash": "sha256-CdftHRV6idRMojLMgnDRxgSOvfP1DU+9KTKyBGlwoSI=" + }, + { + "pname": "Humanizer.Core", + "version": "2.14.1", + "hash": "sha256-EXvojddPu+9JKgOG9NSQgUTfWq1RpOYw7adxDPKDJ6o=" + }, + { + "pname": "Microsoft.AspNetCore.OpenApi", + "version": "10.0.0", + "hash": "sha256-mf3kOdkliLF4OD+CrmEhMNNDGOPKWGBOBWtX2EV5YEU=" + }, + { + "pname": "Microsoft.Build", + "version": "17.7.2", + "hash": "sha256-k35nFdPxC8t0zAltVSmAJtsepp/ubNIjPOsJ6k8jSqM=" + }, + { + "pname": "Microsoft.Build.Framework", + "version": "17.14.28", + "hash": "sha256-7RzEyIipumafwLW1xN1q23114NafG6PT0+RADElNsiM=" + }, + { + "pname": "Microsoft.Build.Framework", + "version": "17.7.2", + "hash": "sha256-fNWmVQYFTJDveAGmxEdNqJRAczV6+Ep8RA8clKBJFqw=" + }, + { + "pname": "Microsoft.Build.Tasks.Core", + "version": "17.14.28", + "hash": "sha256-M9zRXYijH2HtLlRXbrUK1a1LQ9zkT+DC9ZmMiiVZwv0=" + }, + { + "pname": "Microsoft.Build.Tasks.Core", + "version": "17.7.2", + "hash": "sha256-OrV/qWgZHzGlNUmaSfX5wDBcmg1aQeF3/OUHpSH+uZU=" + }, + { + "pname": "Microsoft.Build.Utilities.Core", + "version": "17.14.28", + "hash": "sha256-VFfO+UpyTpw2X/qiCCOCYzvMLuu7B+XVSSpJZQLkPzU=" + }, + { + "pname": "Microsoft.Build.Utilities.Core", + "version": "17.7.2", + "hash": "sha256-oatF0KfuP1nb4+OLNKg2/R/ZLO4EiACaO5leaxMEY4A=" + }, + { + "pname": "Microsoft.CodeAnalysis.Analyzers", + "version": "3.11.0", + "hash": "sha256-hQ2l6E6PO4m7i+ZsfFlEx+93UsLPo4IY3wDkNG11/Sw=" + }, + { + "pname": "Microsoft.CodeAnalysis.Common", + "version": "4.14.0", + "hash": "sha256-ne/zxH3GqoGB4OemnE8oJElG5mai+/67ASaKqwmL2BE=" + }, + { + "pname": "Microsoft.CodeAnalysis.CSharp", + "version": "4.14.0", + "hash": "sha256-5Mzj3XkYYLkwDWh17r1NEXSbXwwWYQPiOmkSMlgo1JY=" + }, + { + "pname": "Microsoft.CodeAnalysis.CSharp.Workspaces", + "version": "4.14.0", + "hash": "sha256-aNbV1a0yYBs0fpQawG6LXcbyoE8en+YFSpV5vcYE4J4=" + }, + { + "pname": "Microsoft.CodeAnalysis.Workspaces.Common", + "version": "4.14.0", + "hash": "sha256-0YfeaJe01WBUm9avy4a8FacQJXA1NkpnDpiXu4yz88I=" + }, + { + "pname": "Microsoft.CodeAnalysis.Workspaces.MSBuild", + "version": "4.14.0", + "hash": "sha256-5SJfpRqzqCK0UbkmAaJpA/r1XJb0YAriMMeQHYC4d+o=" + }, + { + "pname": "Microsoft.EntityFrameworkCore", + "version": "10.0.0", + "hash": "sha256-xfgrlxhtOkQwF5Q7j8gSm41URJiH8IuJ/T/Dh88++hE=" + }, + { + "pname": "Microsoft.EntityFrameworkCore", + "version": "10.0.1", + "hash": "sha256-IxA+/nDA6hZkUm9bDT6bRu8+9qeHA3gbTvIhR9Ncg4w=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Abstractions", + "version": "10.0.0", + "hash": "sha256-UDgZbRQcGPaKsE53EH6bvJiv+Q4KSxAbnsVhTVFGG4Q=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Abstractions", + "version": "10.0.1", + "hash": "sha256-FMGXhAAgcVSedV0/GmUVqAwoiRzFJil9mQYr6eNgowg=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Analyzers", + "version": "10.0.0", + "hash": "sha256-7Q0jYJO50cqGI+u6gLpootbB8GZvgsgtg0F9FZI1jig=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Analyzers", + "version": "10.0.1", + "hash": "sha256-O949vr98WoSRXtiIo0ZI6dz2cibIBKbiuC+mQOe9bV4=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Design", + "version": "10.0.1", + "hash": "sha256-GGNZIGNEMhSGaMRFkRN4bOuCUBs5YVnX8klXarm319U=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Relational", + "version": "10.0.0", + "hash": "sha256-vOP2CE5YA551BlpbOuIy6RuAiAEPEpCVS1cEE33/zN4=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Relational", + "version": "10.0.1", + "hash": "sha256-zLgxr/iW9HP8Fip1IDgr7X0Ar8OWKDvVmoEt65gG6VY=" + }, + { + "pname": "Microsoft.Extensions.Caching.Abstractions", + "version": "10.0.1", + "hash": "sha256-qVLAEqxPK/dNq+z1a6D9NqdcSg/18sfzZhlBWMkqV/A=" + }, + { + "pname": "Microsoft.Extensions.Caching.Memory", + "version": "10.0.0", + "hash": "sha256-AMgDSm1k6q0s17spGtyR5q8nAqUFDOxl/Fe38f9M+d4=" + }, + { + "pname": "Microsoft.Extensions.Caching.Memory", + "version": "10.0.1", + "hash": "sha256-Qb7xK6VEZDas0lJFaW1suKdFjtkSYwLHHxkQEfWIU2A=" + }, + { + "pname": "Microsoft.Extensions.Configuration", + "version": "10.0.0", + "hash": "sha256-MsLskVPpkCvov5+DWIaALCt1qfRRX4u228eHxvpE0dg=" + }, + { + "pname": "Microsoft.Extensions.Configuration.Abstractions", + "version": "10.0.0", + "hash": "sha256-GcgrnTAieCV7AVT13zyOjfwwL86e99iiO/MiMOxPGG0=" + }, + { + "pname": "Microsoft.Extensions.Configuration.Abstractions", + "version": "10.0.1", + "hash": "sha256-s4PDp+vtzdxKIxnOT3+dDRoTDopyl8kqmmw4KDnkOtQ=" + }, + { + "pname": "Microsoft.Extensions.Configuration.Binder", + "version": "10.0.0", + "hash": "sha256-YSiWoA3VQR22k6+bSEAUqeG7UDzZlJfHWDTubUO5V8U=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection", + "version": "10.0.1", + "hash": "sha256-RKOB+zPrtQNUbJY/1jR54rKOM8KHPgynPExxugku3I8=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection", + "version": "9.0.0", + "hash": "sha256-dAH52PPlTLn7X+1aI/7npdrDzMEFPMXRv4isV1a+14k=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection.Abstractions", + "version": "10.0.0", + "hash": "sha256-9iodXP39YqgxomnOPOxd/mzbG0JfOSXzFoNU3omT2Ps=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection.Abstractions", + "version": "10.0.1", + "hash": "sha256-zNUpau51ds7iQTaSUTFtyTHIUoinYc129W50CnufMdQ=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection.Abstractions", + "version": "9.0.0", + "hash": "sha256-CncVwkKZ5CsIG2O0+OM9qXuYXh3p6UGyueTHSLDVL+c=" + }, + { + "pname": "Microsoft.Extensions.DependencyModel", + "version": "10.0.1", + "hash": "sha256-XIj2jEURe25YA4RhBSuCqQpic0YP+TZaO/dbBPCjad8=" + }, + { + "pname": "Microsoft.Extensions.Logging", + "version": "10.0.0", + "hash": "sha256-P+zPAadLL63k/GqK34/qChqQjY9aIRxZfxlB9lqsSrs=" + }, + { + "pname": "Microsoft.Extensions.Logging", + "version": "10.0.1", + "hash": "sha256-zuLP3SIpCToMOlIPOEv3Kq8y/minecd8k8GSkxFo13E=" + }, + { + "pname": "Microsoft.Extensions.Logging", + "version": "9.0.0", + "hash": "sha256-kR16c+N8nQrWeYLajqnXPg7RiXjZMSFLnKLEs4VfjcM=" + }, + { + "pname": "Microsoft.Extensions.Logging.Abstractions", + "version": "10.0.0", + "hash": "sha256-BnhgGZc01HwTSxogavq7Ueq4V7iMA3wPnbfRwQ4RhGk=" + }, + { + "pname": "Microsoft.Extensions.Logging.Abstractions", + "version": "10.0.1", + "hash": "sha256-NRk0feNE1fgi/hyO0AVDbSGJQRT+9yte6Lpm4Hz/2Bs=" + }, + { + "pname": "Microsoft.Extensions.Logging.Abstractions", + "version": "9.0.0", + "hash": "sha256-iBTs9twjWXFeERt4CErkIIcoJZU1jrd1RWCI8V5j7KU=" + }, + { + "pname": "Microsoft.Extensions.Options", + "version": "10.0.1", + "hash": "sha256-vBiSS1vqAC7eDrpJNT4H3A9qLikCSAepnNRbry0mKnk=" + }, + { + "pname": "Microsoft.Extensions.Options", + "version": "9.0.0", + "hash": "sha256-DT5euAQY/ItB5LPI8WIp6Dnd0lSvBRP35vFkOXC68ck=" + }, + { + "pname": "Microsoft.Extensions.Primitives", + "version": "10.0.0", + "hash": "sha256-Dup08KcptLjlnpN5t5//+p4n8FUTgRAq4n/w1s6us+I=" + }, + { + "pname": "Microsoft.Extensions.Primitives", + "version": "10.0.1", + "hash": "sha256-EXmukq09erT4s+miQpBSYy3IY4HxxKlwEPL43/KoyEc=" + }, + { + "pname": "Microsoft.Extensions.Primitives", + "version": "9.0.0", + "hash": "sha256-ZNLusK1CRuq5BZYZMDqaz04PIKScE2Z7sS2tehU7EJs=" + }, + { + "pname": "Microsoft.IdentityModel.Abstractions", + "version": "8.15.0", + "hash": "sha256-LKTvERNUTMCEF7xs377tCMwOMRki93OS4kh6Yv0uXJ4=" + }, + { + "pname": "Microsoft.IdentityModel.JsonWebTokens", + "version": "8.15.0", + "hash": "sha256-LwzKiGjcnORvmQ9tim6lomXpfVlPpd/fE8FKTFWKlpM=" + }, + { + "pname": "Microsoft.IdentityModel.Logging", + "version": "8.15.0", + "hash": "sha256-mMXwsjGcrrmHR1mG7BLTKg/30mX+m93QVX17/ynOOd4=" + }, + { + "pname": "Microsoft.IdentityModel.Tokens", + "version": "8.15.0", + "hash": "sha256-7Lo/TsvqgNCEMyFssO3Om233521Pqgb9K9lUeHc5HMk=" + }, + { + "pname": "Microsoft.NET.StringTools", + "version": "17.14.28", + "hash": "sha256-UzREyvDxkiOQ4cEOQ5UCjkwXGrldIDCcbefECTPGjXI=" + }, + { + "pname": "Microsoft.NET.StringTools", + "version": "17.7.2", + "hash": "sha256-hQE07TCgcQuyu9ZHVq2gPDb0+xe8ECJUdrgh17bJP4o=" + }, + { + "pname": "Microsoft.OpenApi", + "version": "2.0.0", + "hash": "sha256-8eiM3Mx4Hx1etx52RlczoHG2z9XIpWgu2LQtWSt086k=" + }, + { + "pname": "Mono.TextTemplating", + "version": "3.0.0", + "hash": "sha256-VlgGDvgNZb7MeBbIZ4DE2Nn/j2aD9k6XqNHnASUSDr0=" + }, + { + "pname": "Newtonsoft.Json", + "version": "13.0.3", + "hash": "sha256-hy/BieY4qxBWVVsDqqOPaLy1QobiIapkbrESm6v2PHc=" + }, + { + "pname": "Npgsql", + "version": "10.0.0", + "hash": "sha256-UVKz9dH/rVCCbMyFdqA31RYpht1XgDRLIqUy0Dp9ACQ=" + }, + { + "pname": "Npgsql.EntityFrameworkCore.PostgreSQL", + "version": "10.0.0", + "hash": "sha256-XIJxnTMektQVP1qtslEIGbmBGrIQsvjQjCMRTs9UIbg=" + }, + { + "pname": "RabbitMQ.Client", + "version": "7.2.0", + "hash": "sha256-NkEb2ey0jo/OAeaVOUwIeSbeplqkOsgv1+ys8ZQgemQ=" + }, + { + "pname": "System.CodeDom", + "version": "6.0.0", + "hash": "sha256-uPetUFZyHfxjScu5x4agjk9pIhbCkt5rG4Axj25npcQ=" + }, + { + "pname": "System.CodeDom", + "version": "7.0.0", + "hash": "sha256-7IPt39cY+0j0ZcRr/J45xPtEjnSXdUJ/5ai3ebaYQiE=" + }, + { + "pname": "System.CodeDom", + "version": "9.0.0", + "hash": "sha256-578lcBgswW0eM16r0EnJzfGodPx86RxxFoZHc2PSzsw=" + }, + { + "pname": "System.Composition", + "version": "9.0.0", + "hash": "sha256-FehOkQ2u1p8mQ0/wn3cZ+24HjhTLdck8VZYWA1CcgbM=" + }, + { + "pname": "System.Composition.AttributedModel", + "version": "9.0.0", + "hash": "sha256-a7y7H6zj+kmYkllNHA402DoVfY9IaqC3Ooys8Vzl24M=" + }, + { + "pname": "System.Composition.Convention", + "version": "9.0.0", + "hash": "sha256-tw4vE5JRQ60ubTZBbxoMPhtjOQCC3XoDFUH7NHO7o8U=" + }, + { + "pname": "System.Composition.Hosting", + "version": "9.0.0", + "hash": "sha256-oOxU+DPEEfMCuNLgW6wSkZp0JY5gYt44FJNnWt+967s=" + }, + { + "pname": "System.Composition.Runtime", + "version": "9.0.0", + "hash": "sha256-AyIe+di1TqwUBbSJ/sJ8Q8tzsnTN+VBdJw4K8xZz43s=" + }, + { + "pname": "System.Composition.TypedParts", + "version": "9.0.0", + "hash": "sha256-F5fpTUs3Rr7yP/NyIzr+Xn5NdTXXp8rrjBnF9UBBUog=" + }, + { + "pname": "System.Configuration.ConfigurationManager", + "version": "7.0.0", + "hash": "sha256-SgBexTTjRn23uuXvkzO0mz0qOfA23MiS4Wv+qepMLZE=" + }, + { + "pname": "System.Configuration.ConfigurationManager", + "version": "9.0.0", + "hash": "sha256-+pLnTC0YDP6Kjw5DVBiFrV/Q3x5is/+6N6vAtjvhVWk=" + }, + { + "pname": "System.Diagnostics.EventLog", + "version": "9.0.0", + "hash": "sha256-tPvt6yoAp56sK/fe+/ei8M65eavY2UUhRnbrREj/Ems=" + }, + { + "pname": "System.Formats.Nrbf", + "version": "9.0.0", + "hash": "sha256-c4qf6CocQUZB0ySGQd8s15PXY7xfrjQqMGXxkwytKyw=" + }, + { + "pname": "System.IdentityModel.Tokens.Jwt", + "version": "8.15.0", + "hash": "sha256-5O0wbGp0gWnukK+0mWBjMnP1bZc6N0xuNcO2qmFiUX8=" + }, + { + "pname": "System.Reflection.MetadataLoadContext", + "version": "7.0.0", + "hash": "sha256-VYl6SFD130K9Aw4eJH16ApJ9Sau4Xu0dcxEip2veuTI=" + }, + { + "pname": "System.Resources.Extensions", + "version": "9.0.0", + "hash": "sha256-y2gLEMuAy6QfEyNJxABC/ayMWGnwlpX735jsUQLktho=" + }, + { + "pname": "System.Security.Cryptography.Pkcs", + "version": "7.0.0", + "hash": "sha256-3J3vL9hcKSuZjT2GKappa2A9p2xJm1nH2asTNAl8ZCA=" + }, + { + "pname": "System.Security.Cryptography.Pkcs", + "version": "7.0.2", + "hash": "sha256-qS5Z/Yo8J+f3ExVX5Qkcpj1Z57oUZqz5rWa1h5bVpl8=" + }, + { + "pname": "System.Security.Cryptography.Pkcs", + "version": "9.0.0", + "hash": "sha256-AjG14mGeSc2Ka4QSelGBM1LrGBW3VJX60lnihKyJjGY=" + }, + { + "pname": "System.Security.Cryptography.ProtectedData", + "version": "9.0.0", + "hash": "sha256-gPgPU7k/InTqmXoRzQfUMEKL3QuTnOKowFqmXTnWaBQ=" + }, + { + "pname": "System.Security.Cryptography.Xml", + "version": "7.0.1", + "hash": "sha256-CH8+JVC8LyCSW75/6ZQ7ecMbSOAE1c16z4dG8JTp01w=" + }, + { + "pname": "System.Security.Cryptography.Xml", + "version": "9.0.0", + "hash": "sha256-SQJWwAFrJUddEU6JiZB52FM9tGjRlJAYH8oYVzG5IJU=" + }, + { + "pname": "System.Security.Permissions", + "version": "7.0.0", + "hash": "sha256-DOFoX+AKRmrkllykHheR8FfUXYx/Ph+I/HYuReQydXI=" + }, + { + "pname": "System.Security.Permissions", + "version": "9.0.0", + "hash": "sha256-BFrA9ottmQtLIAiKiGRbfSUpzNJwuaOCeFRDN4Z0ku0=" + }, + { + "pname": "System.Threading.RateLimiting", + "version": "8.0.0", + "hash": "sha256-KOEWEt6ZthvZHJ2Wp70d9nBhBrPqobGQDi2twlKYh/w=" + }, + { + "pname": "System.Windows.Extensions", + "version": "9.0.0", + "hash": "sha256-RErD+Ju15qtnwdwB7E0SjjJGAnhXwJyC7UPcl24Z3Vs=" + }, + { + "pname": "Unidecode.NET", + "version": "2.1.0", + "hash": "sha256-nfxHxG/YwRftOP+wiSW8NL5hIVwt+wnfRb0lURjrZoc=" + } +] diff --git a/extra/admin-api/Spacebar.CleanSettingsRows/deps.json b/extra/admin-api/Spacebar.CleanSettingsRows/deps.json new file mode 100644 index 000000000..2938cdaae --- /dev/null +++ b/extra/admin-api/Spacebar.CleanSettingsRows/deps.json @@ -0,0 +1,492 @@ +[ + { + "pname": "Humanizer.Core", + "version": "2.14.1", + "hash": "sha256-EXvojddPu+9JKgOG9NSQgUTfWq1RpOYw7adxDPKDJ6o=" + }, + { + "pname": "Microsoft.Build", + "version": "17.7.2", + "hash": "sha256-k35nFdPxC8t0zAltVSmAJtsepp/ubNIjPOsJ6k8jSqM=" + }, + { + "pname": "Microsoft.Build.Framework", + "version": "17.14.28", + "hash": "sha256-7RzEyIipumafwLW1xN1q23114NafG6PT0+RADElNsiM=" + }, + { + "pname": "Microsoft.Build.Framework", + "version": "17.7.2", + "hash": "sha256-fNWmVQYFTJDveAGmxEdNqJRAczV6+Ep8RA8clKBJFqw=" + }, + { + "pname": "Microsoft.Build.Tasks.Core", + "version": "17.14.28", + "hash": "sha256-M9zRXYijH2HtLlRXbrUK1a1LQ9zkT+DC9ZmMiiVZwv0=" + }, + { + "pname": "Microsoft.Build.Tasks.Core", + "version": "17.7.2", + "hash": "sha256-OrV/qWgZHzGlNUmaSfX5wDBcmg1aQeF3/OUHpSH+uZU=" + }, + { + "pname": "Microsoft.Build.Utilities.Core", + "version": "17.14.28", + "hash": "sha256-VFfO+UpyTpw2X/qiCCOCYzvMLuu7B+XVSSpJZQLkPzU=" + }, + { + "pname": "Microsoft.Build.Utilities.Core", + "version": "17.7.2", + "hash": "sha256-oatF0KfuP1nb4+OLNKg2/R/ZLO4EiACaO5leaxMEY4A=" + }, + { + "pname": "Microsoft.CodeAnalysis.Analyzers", + "version": "3.11.0", + "hash": "sha256-hQ2l6E6PO4m7i+ZsfFlEx+93UsLPo4IY3wDkNG11/Sw=" + }, + { + "pname": "Microsoft.CodeAnalysis.Common", + "version": "4.14.0", + "hash": "sha256-ne/zxH3GqoGB4OemnE8oJElG5mai+/67ASaKqwmL2BE=" + }, + { + "pname": "Microsoft.CodeAnalysis.CSharp", + "version": "4.14.0", + "hash": "sha256-5Mzj3XkYYLkwDWh17r1NEXSbXwwWYQPiOmkSMlgo1JY=" + }, + { + "pname": "Microsoft.CodeAnalysis.CSharp.Workspaces", + "version": "4.14.0", + "hash": "sha256-aNbV1a0yYBs0fpQawG6LXcbyoE8en+YFSpV5vcYE4J4=" + }, + { + "pname": "Microsoft.CodeAnalysis.Workspaces.Common", + "version": "4.14.0", + "hash": "sha256-0YfeaJe01WBUm9avy4a8FacQJXA1NkpnDpiXu4yz88I=" + }, + { + "pname": "Microsoft.CodeAnalysis.Workspaces.MSBuild", + "version": "4.14.0", + "hash": "sha256-5SJfpRqzqCK0UbkmAaJpA/r1XJb0YAriMMeQHYC4d+o=" + }, + { + "pname": "Microsoft.EntityFrameworkCore", + "version": "10.0.0", + "hash": "sha256-xfgrlxhtOkQwF5Q7j8gSm41URJiH8IuJ/T/Dh88++hE=" + }, + { + "pname": "Microsoft.EntityFrameworkCore", + "version": "10.0.1", + "hash": "sha256-IxA+/nDA6hZkUm9bDT6bRu8+9qeHA3gbTvIhR9Ncg4w=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Abstractions", + "version": "10.0.0", + "hash": "sha256-UDgZbRQcGPaKsE53EH6bvJiv+Q4KSxAbnsVhTVFGG4Q=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Abstractions", + "version": "10.0.1", + "hash": "sha256-FMGXhAAgcVSedV0/GmUVqAwoiRzFJil9mQYr6eNgowg=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Analyzers", + "version": "10.0.0", + "hash": "sha256-7Q0jYJO50cqGI+u6gLpootbB8GZvgsgtg0F9FZI1jig=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Analyzers", + "version": "10.0.1", + "hash": "sha256-O949vr98WoSRXtiIo0ZI6dz2cibIBKbiuC+mQOe9bV4=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Design", + "version": "10.0.1", + "hash": "sha256-GGNZIGNEMhSGaMRFkRN4bOuCUBs5YVnX8klXarm319U=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Relational", + "version": "10.0.0", + "hash": "sha256-vOP2CE5YA551BlpbOuIy6RuAiAEPEpCVS1cEE33/zN4=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Relational", + "version": "10.0.1", + "hash": "sha256-zLgxr/iW9HP8Fip1IDgr7X0Ar8OWKDvVmoEt65gG6VY=" + }, + { + "pname": "Microsoft.Extensions.Caching.Abstractions", + "version": "10.0.1", + "hash": "sha256-qVLAEqxPK/dNq+z1a6D9NqdcSg/18sfzZhlBWMkqV/A=" + }, + { + "pname": "Microsoft.Extensions.Caching.Memory", + "version": "10.0.0", + "hash": "sha256-AMgDSm1k6q0s17spGtyR5q8nAqUFDOxl/Fe38f9M+d4=" + }, + { + "pname": "Microsoft.Extensions.Caching.Memory", + "version": "10.0.1", + "hash": "sha256-Qb7xK6VEZDas0lJFaW1suKdFjtkSYwLHHxkQEfWIU2A=" + }, + { + "pname": "Microsoft.Extensions.Configuration", + "version": "10.0.0", + "hash": "sha256-MsLskVPpkCvov5+DWIaALCt1qfRRX4u228eHxvpE0dg=" + }, + { + "pname": "Microsoft.Extensions.Configuration.Abstractions", + "version": "10.0.0", + "hash": "sha256-GcgrnTAieCV7AVT13zyOjfwwL86e99iiO/MiMOxPGG0=" + }, + { + "pname": "Microsoft.Extensions.Configuration.Abstractions", + "version": "10.0.1", + "hash": "sha256-s4PDp+vtzdxKIxnOT3+dDRoTDopyl8kqmmw4KDnkOtQ=" + }, + { + "pname": "Microsoft.Extensions.Configuration.Binder", + "version": "10.0.0", + "hash": "sha256-YSiWoA3VQR22k6+bSEAUqeG7UDzZlJfHWDTubUO5V8U=" + }, + { + "pname": "Microsoft.Extensions.Configuration.CommandLine", + "version": "10.0.0", + "hash": "sha256-ldTiRFqnv8/pA0gl6UR+4DDGAIZOf9+MhaLWOuKOXOI=" + }, + { + "pname": "Microsoft.Extensions.Configuration.EnvironmentVariables", + "version": "10.0.0", + "hash": "sha256-UayfeqrAmNyfOkuhcBKfj8UpjQqV/ZMqWrDyxCSG1MA=" + }, + { + "pname": "Microsoft.Extensions.Configuration.FileExtensions", + "version": "10.0.0", + "hash": "sha256-rN+3rqrHiTaBfHgP+E4dA8Qm2cFJPfbEcd93yKLsqlQ=" + }, + { + "pname": "Microsoft.Extensions.Configuration.Json", + "version": "10.0.0", + "hash": "sha256-VCFukgsxiQ2MFGE6RDMFTGopBHbcZL2t0ER7ENaFXRY=" + }, + { + "pname": "Microsoft.Extensions.Configuration.UserSecrets", + "version": "10.0.0", + "hash": "sha256-uIoIpbDPRMfFqT8Y6j/wHbFCAly6H1N9qpxnomRbHIo=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection", + "version": "10.0.0", + "hash": "sha256-LYm9hVlo/R9c2aAKHsDYJ5vY9U0+3Jvclme3ou3BtvQ=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection", + "version": "10.0.1", + "hash": "sha256-RKOB+zPrtQNUbJY/1jR54rKOM8KHPgynPExxugku3I8=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection", + "version": "9.0.0", + "hash": "sha256-dAH52PPlTLn7X+1aI/7npdrDzMEFPMXRv4isV1a+14k=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection.Abstractions", + "version": "10.0.0", + "hash": "sha256-9iodXP39YqgxomnOPOxd/mzbG0JfOSXzFoNU3omT2Ps=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection.Abstractions", + "version": "10.0.1", + "hash": "sha256-zNUpau51ds7iQTaSUTFtyTHIUoinYc129W50CnufMdQ=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection.Abstractions", + "version": "9.0.0", + "hash": "sha256-CncVwkKZ5CsIG2O0+OM9qXuYXh3p6UGyueTHSLDVL+c=" + }, + { + "pname": "Microsoft.Extensions.DependencyModel", + "version": "10.0.1", + "hash": "sha256-XIj2jEURe25YA4RhBSuCqQpic0YP+TZaO/dbBPCjad8=" + }, + { + "pname": "Microsoft.Extensions.Diagnostics", + "version": "10.0.0", + "hash": "sha256-o7QkCisEcFIh227qBUfWFci2ns4cgEpLqpX7YvHGToQ=" + }, + { + "pname": "Microsoft.Extensions.Diagnostics.Abstractions", + "version": "10.0.0", + "hash": "sha256-cix7QxQ/g3sj6reXu3jn0cRv2RijzceaLLkchEGTt5E=" + }, + { + "pname": "Microsoft.Extensions.FileProviders.Abstractions", + "version": "10.0.0", + "hash": "sha256-CHDs2HCN8QcfuYQpgNVszZ5dfXFe4yS9K2GoQXecc20=" + }, + { + "pname": "Microsoft.Extensions.FileProviders.Physical", + "version": "10.0.0", + "hash": "sha256-2Rw/cwBO+/A3QY2IjN/c8Y0LhtC1qTBL7VdJiD1J2UQ=" + }, + { + "pname": "Microsoft.Extensions.FileSystemGlobbing", + "version": "10.0.0", + "hash": "sha256-ETfVTdsdBtp69EggLg/AARTQW4lLQYVdVldXIQrsjZA=" + }, + { + "pname": "Microsoft.Extensions.Hosting", + "version": "10.0.0", + "hash": "sha256-tY0g6lCy2yFprE+NmriiU6FGmwpzxV8LqE0ZFNKIwuM=" + }, + { + "pname": "Microsoft.Extensions.Hosting.Abstractions", + "version": "10.0.0", + "hash": "sha256-Sub3Thay/+eR84cEODk/nPh1oYIYtawvDX6r0duReqo=" + }, + { + "pname": "Microsoft.Extensions.Logging", + "version": "10.0.0", + "hash": "sha256-P+zPAadLL63k/GqK34/qChqQjY9aIRxZfxlB9lqsSrs=" + }, + { + "pname": "Microsoft.Extensions.Logging", + "version": "10.0.1", + "hash": "sha256-zuLP3SIpCToMOlIPOEv3Kq8y/minecd8k8GSkxFo13E=" + }, + { + "pname": "Microsoft.Extensions.Logging", + "version": "9.0.0", + "hash": "sha256-kR16c+N8nQrWeYLajqnXPg7RiXjZMSFLnKLEs4VfjcM=" + }, + { + "pname": "Microsoft.Extensions.Logging.Abstractions", + "version": "10.0.0", + "hash": "sha256-BnhgGZc01HwTSxogavq7Ueq4V7iMA3wPnbfRwQ4RhGk=" + }, + { + "pname": "Microsoft.Extensions.Logging.Abstractions", + "version": "10.0.1", + "hash": "sha256-NRk0feNE1fgi/hyO0AVDbSGJQRT+9yte6Lpm4Hz/2Bs=" + }, + { + "pname": "Microsoft.Extensions.Logging.Abstractions", + "version": "9.0.0", + "hash": "sha256-iBTs9twjWXFeERt4CErkIIcoJZU1jrd1RWCI8V5j7KU=" + }, + { + "pname": "Microsoft.Extensions.Logging.Configuration", + "version": "10.0.0", + "hash": "sha256-7/TWO1aq8hdgbcTEKDBWIjgSC9KpFN3kRnMX+12bOkU=" + }, + { + "pname": "Microsoft.Extensions.Logging.Console", + "version": "10.0.0", + "hash": "sha256-Rsblo7GSMTOr43876KkdvqS6wU9Typ1yoFK3tL50CBk=" + }, + { + "pname": "Microsoft.Extensions.Logging.Debug", + "version": "10.0.0", + "hash": "sha256-n/+KRVlsgKm17cJImaoAPHAObHpApW/hf6mMsQFGrvY=" + }, + { + "pname": "Microsoft.Extensions.Logging.EventLog", + "version": "10.0.0", + "hash": "sha256-4RJ2r80RtI3QUAhCAYbGnA0YcTmouqtZvQU9o3CrB38=" + }, + { + "pname": "Microsoft.Extensions.Logging.EventSource", + "version": "10.0.0", + "hash": "sha256-tqC13Qwkf4x14iGxOYlXTyeoN8KPVX+mupv2LdpzGHo=" + }, + { + "pname": "Microsoft.Extensions.Options", + "version": "10.0.0", + "hash": "sha256-j5MOqZSKeUtxxzmZjzZMGy0vELHdvPraqwTQQQNVsYA=" + }, + { + "pname": "Microsoft.Extensions.Options", + "version": "10.0.1", + "hash": "sha256-vBiSS1vqAC7eDrpJNT4H3A9qLikCSAepnNRbry0mKnk=" + }, + { + "pname": "Microsoft.Extensions.Options", + "version": "9.0.0", + "hash": "sha256-DT5euAQY/ItB5LPI8WIp6Dnd0lSvBRP35vFkOXC68ck=" + }, + { + "pname": "Microsoft.Extensions.Options.ConfigurationExtensions", + "version": "10.0.0", + "hash": "sha256-XGAs5DxMvWnmjX8dqRwKY0vsuS40SHvsfJqB1rO4L7k=" + }, + { + "pname": "Microsoft.Extensions.Primitives", + "version": "10.0.0", + "hash": "sha256-Dup08KcptLjlnpN5t5//+p4n8FUTgRAq4n/w1s6us+I=" + }, + { + "pname": "Microsoft.Extensions.Primitives", + "version": "10.0.1", + "hash": "sha256-EXmukq09erT4s+miQpBSYy3IY4HxxKlwEPL43/KoyEc=" + }, + { + "pname": "Microsoft.Extensions.Primitives", + "version": "9.0.0", + "hash": "sha256-ZNLusK1CRuq5BZYZMDqaz04PIKScE2Z7sS2tehU7EJs=" + }, + { + "pname": "Microsoft.NET.StringTools", + "version": "17.14.28", + "hash": "sha256-UzREyvDxkiOQ4cEOQ5UCjkwXGrldIDCcbefECTPGjXI=" + }, + { + "pname": "Microsoft.NET.StringTools", + "version": "17.7.2", + "hash": "sha256-hQE07TCgcQuyu9ZHVq2gPDb0+xe8ECJUdrgh17bJP4o=" + }, + { + "pname": "Mono.TextTemplating", + "version": "3.0.0", + "hash": "sha256-VlgGDvgNZb7MeBbIZ4DE2Nn/j2aD9k6XqNHnASUSDr0=" + }, + { + "pname": "Newtonsoft.Json", + "version": "13.0.3", + "hash": "sha256-hy/BieY4qxBWVVsDqqOPaLy1QobiIapkbrESm6v2PHc=" + }, + { + "pname": "Npgsql", + "version": "10.0.0", + "hash": "sha256-UVKz9dH/rVCCbMyFdqA31RYpht1XgDRLIqUy0Dp9ACQ=" + }, + { + "pname": "Npgsql.EntityFrameworkCore.PostgreSQL", + "version": "10.0.0", + "hash": "sha256-XIJxnTMektQVP1qtslEIGbmBGrIQsvjQjCMRTs9UIbg=" + }, + { + "pname": "System.CodeDom", + "version": "6.0.0", + "hash": "sha256-uPetUFZyHfxjScu5x4agjk9pIhbCkt5rG4Axj25npcQ=" + }, + { + "pname": "System.CodeDom", + "version": "7.0.0", + "hash": "sha256-7IPt39cY+0j0ZcRr/J45xPtEjnSXdUJ/5ai3ebaYQiE=" + }, + { + "pname": "System.CodeDom", + "version": "9.0.0", + "hash": "sha256-578lcBgswW0eM16r0EnJzfGodPx86RxxFoZHc2PSzsw=" + }, + { + "pname": "System.Composition", + "version": "9.0.0", + "hash": "sha256-FehOkQ2u1p8mQ0/wn3cZ+24HjhTLdck8VZYWA1CcgbM=" + }, + { + "pname": "System.Composition.AttributedModel", + "version": "9.0.0", + "hash": "sha256-a7y7H6zj+kmYkllNHA402DoVfY9IaqC3Ooys8Vzl24M=" + }, + { + "pname": "System.Composition.Convention", + "version": "9.0.0", + "hash": "sha256-tw4vE5JRQ60ubTZBbxoMPhtjOQCC3XoDFUH7NHO7o8U=" + }, + { + "pname": "System.Composition.Hosting", + "version": "9.0.0", + "hash": "sha256-oOxU+DPEEfMCuNLgW6wSkZp0JY5gYt44FJNnWt+967s=" + }, + { + "pname": "System.Composition.Runtime", + "version": "9.0.0", + "hash": "sha256-AyIe+di1TqwUBbSJ/sJ8Q8tzsnTN+VBdJw4K8xZz43s=" + }, + { + "pname": "System.Composition.TypedParts", + "version": "9.0.0", + "hash": "sha256-F5fpTUs3Rr7yP/NyIzr+Xn5NdTXXp8rrjBnF9UBBUog=" + }, + { + "pname": "System.Configuration.ConfigurationManager", + "version": "7.0.0", + "hash": "sha256-SgBexTTjRn23uuXvkzO0mz0qOfA23MiS4Wv+qepMLZE=" + }, + { + "pname": "System.Configuration.ConfigurationManager", + "version": "9.0.0", + "hash": "sha256-+pLnTC0YDP6Kjw5DVBiFrV/Q3x5is/+6N6vAtjvhVWk=" + }, + { + "pname": "System.Diagnostics.EventLog", + "version": "10.0.0", + "hash": "sha256-pN3tld926Fp0n5ZNjjzIJviUQrynlOAB0vhc1aoso6E=" + }, + { + "pname": "System.Diagnostics.EventLog", + "version": "9.0.0", + "hash": "sha256-tPvt6yoAp56sK/fe+/ei8M65eavY2UUhRnbrREj/Ems=" + }, + { + "pname": "System.Formats.Nrbf", + "version": "9.0.0", + "hash": "sha256-c4qf6CocQUZB0ySGQd8s15PXY7xfrjQqMGXxkwytKyw=" + }, + { + "pname": "System.Reflection.MetadataLoadContext", + "version": "7.0.0", + "hash": "sha256-VYl6SFD130K9Aw4eJH16ApJ9Sau4Xu0dcxEip2veuTI=" + }, + { + "pname": "System.Resources.Extensions", + "version": "9.0.0", + "hash": "sha256-y2gLEMuAy6QfEyNJxABC/ayMWGnwlpX735jsUQLktho=" + }, + { + "pname": "System.Security.Cryptography.Pkcs", + "version": "7.0.0", + "hash": "sha256-3J3vL9hcKSuZjT2GKappa2A9p2xJm1nH2asTNAl8ZCA=" + }, + { + "pname": "System.Security.Cryptography.Pkcs", + "version": "7.0.2", + "hash": "sha256-qS5Z/Yo8J+f3ExVX5Qkcpj1Z57oUZqz5rWa1h5bVpl8=" + }, + { + "pname": "System.Security.Cryptography.Pkcs", + "version": "9.0.0", + "hash": "sha256-AjG14mGeSc2Ka4QSelGBM1LrGBW3VJX60lnihKyJjGY=" + }, + { + "pname": "System.Security.Cryptography.ProtectedData", + "version": "9.0.0", + "hash": "sha256-gPgPU7k/InTqmXoRzQfUMEKL3QuTnOKowFqmXTnWaBQ=" + }, + { + "pname": "System.Security.Cryptography.Xml", + "version": "7.0.1", + "hash": "sha256-CH8+JVC8LyCSW75/6ZQ7ecMbSOAE1c16z4dG8JTp01w=" + }, + { + "pname": "System.Security.Cryptography.Xml", + "version": "9.0.0", + "hash": "sha256-SQJWwAFrJUddEU6JiZB52FM9tGjRlJAYH8oYVzG5IJU=" + }, + { + "pname": "System.Security.Permissions", + "version": "7.0.0", + "hash": "sha256-DOFoX+AKRmrkllykHheR8FfUXYx/Ph+I/HYuReQydXI=" + }, + { + "pname": "System.Security.Permissions", + "version": "9.0.0", + "hash": "sha256-BFrA9ottmQtLIAiKiGRbfSUpzNJwuaOCeFRDN4Z0ku0=" + }, + { + "pname": "System.Windows.Extensions", + "version": "9.0.0", + "hash": "sha256-RErD+Ju15qtnwdwB7E0SjjJGAnhXwJyC7UPcl24Z3Vs=" + } +] diff --git a/extra/admin-api/Spacebar.ConfigModel/Class1.cs b/extra/admin-api/Spacebar.ConfigModel/Class1.cs new file mode 100644 index 000000000..948ca91a2 --- /dev/null +++ b/extra/admin-api/Spacebar.ConfigModel/Class1.cs @@ -0,0 +1,64 @@ +using System.Text.Json.Serialization; + +namespace Spacebar.ConfigModel; + +public class Config +{ + [JsonPropertyName("admin")] public EndpointConfig Admin { get; set; } = null!; + [JsonPropertyName("api")] public EndpointConfig Api { get; set; } = null!; + [JsonPropertyName("gateway")] public EndpointConfig Gateway { get; set; } = null!; + [JsonPropertyName("cdn")] public EndpointConfig Cdn { get; set; } = null!; + + public Config ReadFromKv(Dictionary kv) + { + // to object + + + foreach (var (key, value) in kv) + { + switch (key.Split('_', 2)[0]) + { + default: + Console.WriteLine($"Unrecognized config key prefix: {key}"); + continue; + } + } + + return this; + } +} + +public class EndpointConfig +{ + [JsonPropertyName("endpointPrivate")] public string? EndpointPrivate { get; set; } + [JsonPropertyName("endpointPublic")] public string? EndpointPublic { get; set; } + + public EndpointConfig ReadFromKv(Dictionary kv, string prefix) + { + foreach (var (key, value) in kv) + { + if (!key.StartsWith(prefix + "_")) continue; + var subKey = key[(prefix + "_").Length..]; + switch (subKey) + { + case "ENDPOINT_PRIVATE": + EndpointPrivate = value?.ToString(); + break; + case "ENDPOINT_PUBLIC": + EndpointPublic = value?.ToString(); + break; + default: + Console.WriteLine($"Unrecognized config key: {key}"); + break; + } + } + + return this; + } +} + +public class ApiConfig : EndpointConfig +{ + [JsonPropertyName("activeVersions")] public List ActiveVersions { get; set; } = null!; + [JsonPropertyName("defaultVersion")] public string DefaultVersion { get; set; } = null!; +} \ No newline at end of file diff --git a/extra/admin-api/Spacebar.ConfigModel/Extensions/JsonExtensions.cs b/extra/admin-api/Spacebar.ConfigModel/Extensions/JsonExtensions.cs new file mode 100644 index 000000000..20ae73318 --- /dev/null +++ b/extra/admin-api/Spacebar.ConfigModel/Extensions/JsonExtensions.cs @@ -0,0 +1,119 @@ +using System.Text.Json; +using System.Text.Json.Nodes; + +namespace Spacebar.ConfigModel.Extensions; + +public static class JsonExtensions +{ + extension(Dictionary kv) + { + public JsonObject ToNestedJsonObject(string path = "$") + { + JsonObject root = new(); + // group by prefix + var groups = kv.GroupBy(kvItem => kvItem.Key.Split('_', 2)[0]); + foreach (var group in groups) + { + var prefix = group.Key; + + if (group.Count() == 1 && !group.First().Key.Contains('_')) + { + root[prefix] = group.First().Value == null ? null : JsonNode.Parse(group.First().Value!); + Console.WriteLine("[CONFIG] Single Key: {0}.{1}, Value: {2}", path, prefix, root[prefix]?.ToJsonString()); + continue; + } + + var nestedValues = group.Where(x => x.Key.Contains('_')).ToDictionary(kvItem => kvItem.Key[(prefix.Length + 1)..], kvItem => kvItem.Value); + + if (nestedValues.All(x => int.TryParse(x.Key.Split('_')[0], out _))) + { + Console.WriteLine("[CONFIG] Array Key Detected: {0}.{1}", path, prefix); + var arr = new JsonArray(); + if (nestedValues.All(x => x.Key.Contains('_'))) + { + var objs = nestedValues.GroupBy(x => x.Key.Split('_', 2)[0]); + foreach (var objGroup in objs.OrderBy(x => int.Parse(x.Key))) + { + var i = objGroup.Key; + var objValues = objGroup.ToDictionary(kvItem => kvItem.Key[(i.Length + 1)..], kvItem => kvItem.Value); + var obj = objValues.ToNestedJsonObject($"{path}.{prefix}[{i}]"); + arr.Add(obj); + Console.WriteLine($" - ${path}.{prefix}[{i}]: {obj.ToJsonString()}"); + } + } + else + foreach (var (i, arrayItem) in nestedValues.OrderBy(x => int.Parse(x.Key))) + { + arr.Add(arrayItem == null ? null : JsonNode.Parse(arrayItem)); + Console.WriteLine($" - {path}.{prefix}[{i}]: {arrayItem}"); + } + + root[prefix] = arr; + } + else + { + root[prefix] = nestedValues.ToNestedJsonObject($"{path}.{prefix}"); + } + } + + return root; + } + } + + extension(JsonObject jo) + { + public Dictionary ToFlatKv(string path = "$") + { + var kv = new Dictionary(); + var jso = new JsonSerializerOptions() + { + Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping + }; + + foreach (var (key, value) in jo) + { + var currentPath = path == "$" ? key : $"{path}_{key}"; + + switch (value) + { + case JsonObject nestedObj: + var nestedKv = nestedObj.ToFlatKv(currentPath); + foreach (var (nestedKey, nestedValue) in nestedKv) + { + kv[nestedKey] = nestedValue; + } + + break; + case JsonArray arr: + for (int i = 0; i < arr.Count; i++) + { + var item = arr[i]; + var itemPath = $"{currentPath}_{i}"; + switch (item) + { + case JsonObject arrObj: + var arrObjKv = arrObj.ToFlatKv(itemPath); + foreach (var (arrObjKey, arrObjValue) in arrObjKv) + { + kv[arrObjKey] = arrObjValue; + } + + break; + default: + kv[itemPath] = item?.ToJsonString(jso); + break; + } + } + + break; + default: + Console.WriteLine(value?.GetType()); + kv[currentPath] = value?.ToJsonString(jso); + break; + } + } + + return kv; + } + } +} \ No newline at end of file diff --git a/extra/admin-api/Spacebar.ConfigModel/Spacebar.ConfigModel.csproj b/extra/admin-api/Spacebar.ConfigModel/Spacebar.ConfigModel.csproj new file mode 100644 index 000000000..237d66167 --- /dev/null +++ b/extra/admin-api/Spacebar.ConfigModel/Spacebar.ConfigModel.csproj @@ -0,0 +1,9 @@ + + + + net10.0 + enable + enable + + + diff --git a/extra/admin-api/Spacebar.Db/Contexts/SpacebarDbContext.cs b/extra/admin-api/Spacebar.Db/Contexts/SpacebarDbContext.cs index 516995130..7d380b1c3 100644 --- a/extra/admin-api/Spacebar.Db/Contexts/SpacebarDbContext.cs +++ b/extra/admin-api/Spacebar.Db/Contexts/SpacebarDbContext.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using Spacebar.Db.Models; using Stream = Spacebar.Db.Models.Stream; @@ -15,6 +13,8 @@ public partial class SpacebarDbContext : DbContext public virtual DbSet Applications { get; set; } + public virtual DbSet ApplicationCommands { get; set; } + public virtual DbSet Attachments { get; set; } public virtual DbSet AuditLogs { get; set; } @@ -47,6 +47,8 @@ public partial class SpacebarDbContext : DbContext public virtual DbSet Guilds { get; set; } + public virtual DbSet InstanceBans { get; set; } + public virtual DbSet Invites { get; set; } public virtual DbSet Members { get; set; } @@ -120,6 +122,16 @@ public partial class SpacebarDbContext : DbContext .HasConstraintName("FK_a36ed02953077f408d0f3ebc424"); }); + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Id).HasName("PK_0f73c2f025989c407947e1f75fe"); + + entity.Property(e => e.DmPermission).HasDefaultValue(true); + entity.Property(e => e.Options).HasDefaultValueSql("'[]'::text"); + entity.Property(e => e.Type).HasDefaultValue(1); + entity.Property(e => e.Version).HasDefaultValueSql("'0'::character varying"); + }); + modelBuilder.Entity(entity => { entity.HasKey(e => e.Id).HasName("PK_5e1f050bcff31e3084a1d662412"); @@ -266,6 +278,17 @@ public partial class SpacebarDbContext : DbContext entity.HasOne(d => d.WidgetChannel).WithMany(p => p.GuildWidgetChannels).HasConstraintName("FK_9d1d665379eefde7876a17afa99"); }); + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Id).HasName("PK_3aa6e80a6d325601054892b1340"); + + entity.Property(e => e.CreatedAt).HasDefaultValueSql("now()"); + + entity.HasOne(d => d.OriginInstanceBan).WithOne(p => p.InverseOriginInstanceBan) + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("FK_0b02d18d0d830f160c921192a30"); + }); + modelBuilder.Entity(entity => { entity.HasKey(e => e.Code).HasName("PK_33fd8a248db1cd832baa8aa25bf"); @@ -321,7 +344,6 @@ public partial class SpacebarDbContext : DbContext { entity.HasKey(e => e.Id).HasName("PK_18325f38ae6de43878487eff986"); - entity.Property(e => e.Flags).HasDefaultValue(0); entity.Property(e => e.Timestamp).HasDefaultValueSql("now()"); entity.HasOne(d => d.Application).WithMany(p => p.Messages).HasConstraintName("FK_5d3ec1cb962de6488637fd779d6"); @@ -342,7 +364,9 @@ public partial class SpacebarDbContext : DbContext .OnDelete(DeleteBehavior.Cascade) .HasConstraintName("FK_b0525304f2262b7014245351c76"); - entity.HasOne(d => d.MessageReferenceNavigation).WithMany(p => p.InverseMessageReferenceNavigation).HasConstraintName("FK_61a92bb65b302a76d9c1fcd3174"); + entity.HasOne(d => d.MessageReferenceNavigation).WithMany(p => p.InverseMessageReferenceNavigation) + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("FK_61a92bb65b302a76d9c1fcd3174"); entity.HasOne(d => d.Webhook).WithMany(p => p.Messages).HasConstraintName("FK_f83c04bcf1df4e5c0e7a52ed348"); @@ -475,8 +499,6 @@ public partial class SpacebarDbContext : DbContext { entity.HasKey(e => e.Id).HasName("PK_de8fc5a9c364568f294798fe1e9"); - entity.Property(e => e.Closed).HasDefaultValue(false); - entity.HasOne(d => d.Channel).WithMany(p => p.Recipients).HasConstraintName("FK_2f18ee1ba667f233ae86c0ea60e"); entity.HasOne(d => d.User).WithMany(p => p.Recipients).HasConstraintName("FK_6157e8b6ba4e6e3089616481fe2"); @@ -495,8 +517,6 @@ public partial class SpacebarDbContext : DbContext { entity.HasKey(e => e.Id).HasName("PK_c1433d71a4838793a49dcad46ab"); - entity.Property(e => e.Flags).HasDefaultValue(0); - entity.HasOne(d => d.Guild).WithMany(p => p.Roles).HasConstraintName("FK_c32c1ab1c4dc7dcb0278c4b1b8b"); }); @@ -518,6 +538,8 @@ public partial class SpacebarDbContext : DbContext { entity.HasKey(e => e.Id).HasName("PK_3238ef96f18b355b671619111bc"); + entity.Property(e => e.Activities).HasDefaultValueSql("'[]'::text"); + entity.HasOne(d => d.User).WithMany(p => p.Sessions) .OnDelete(DeleteBehavior.Cascade) .HasConstraintName("FK_085d540d9f418cfbdc7bd55bb19"); @@ -560,8 +582,6 @@ public partial class SpacebarDbContext : DbContext { entity.HasKey(e => e.Id).HasName("PK_49bdc3f66394c12478f8371c546"); - entity.Property(e => e.Used).HasDefaultValue(false); - entity.HasOne(d => d.Stream).WithMany(p => p.StreamSessions).HasConstraintName("FK_8b5a028a34dae9ee54af37c9c32"); entity.HasOne(d => d.User).WithMany(p => p.StreamSessions).HasConstraintName("FK_13ae5c29aff4d0890c54179511a"); @@ -602,8 +622,6 @@ public partial class SpacebarDbContext : DbContext { entity.HasKey(e => e.Id).HasName("PK_a3ffb1c0c8416b9fc6f907b7433"); - entity.Property(e => e.WebauthnEnabled).HasDefaultValue(false); - entity.HasOne(d => d.SettingsIndexNavigation).WithOne(p => p.User).HasConstraintName("FK_0c14beb78d8c5ccba66072adbc7"); }); diff --git a/extra/admin-api/Spacebar.Db/Models/Application.cs b/extra/admin-api/Spacebar.Db/Models/Application.cs index 27d8a45b5..a5dda6f85 100644 --- a/extra/admin-api/Spacebar.Db/Models/Application.cs +++ b/extra/admin-api/Spacebar.Db/Models/Application.cs @@ -86,12 +86,6 @@ public partial class Application [Column("privacy_policy_url", TypeName = "character varying")] public string? PrivacyPolicyUrl { get; set; } - [Column("guild_id", TypeName = "character varying")] - public string? GuildId { get; set; } - - [Column("custom_install_url", TypeName = "character varying")] - public string? CustomInstallUrl { get; set; } - [Column("owner_id", TypeName = "character varying")] public string? OwnerId { get; set; } @@ -101,6 +95,12 @@ public partial class Application [Column("team_id", TypeName = "character varying")] public string? TeamId { get; set; } + [Column("guild_id", TypeName = "character varying")] + public string? GuildId { get; set; } + + [Column("custom_install_url", TypeName = "character varying")] + public string? CustomInstallUrl { get; set; } + [ForeignKey("BotUserId")] [InverseProperty("ApplicationBotUser")] public virtual User? BotUser { get; set; } diff --git a/extra/admin-api/Spacebar.Db/Models/ApplicationCommand.cs b/extra/admin-api/Spacebar.Db/Models/ApplicationCommand.cs new file mode 100644 index 000000000..96c6d2aec --- /dev/null +++ b/extra/admin-api/Spacebar.Db/Models/ApplicationCommand.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Spacebar.Db.Models; + +[Table("application_commands")] +public partial class ApplicationCommand +{ + [Key] + [Column("id", TypeName = "character varying")] + public string Id { get; set; } = null!; + + [Column("type")] + public int Type { get; set; } + + [Column("application_id", TypeName = "character varying")] + public string ApplicationId { get; set; } = null!; + + [Column("guild_id", TypeName = "character varying")] + public string? GuildId { get; set; } + + [Column("name", TypeName = "character varying")] + public string Name { get; set; } = null!; + + [Column("name_localizations")] + public string? NameLocalizations { get; set; } + + [Column("description", TypeName = "character varying")] + public string Description { get; set; } = null!; + + [Column("description_localizations")] + public string? DescriptionLocalizations { get; set; } + + [Column("options")] + public string Options { get; set; } = null!; + + [Column("default_member_permissions", TypeName = "character varying")] + public string? DefaultMemberPermissions { get; set; } + + [Column("dm_permission")] + public bool DmPermission { get; set; } + + [Column("permissions")] + public string? Permissions { get; set; } + + [Column("nsfw")] + public bool Nsfw { get; set; } + + [Column("integration_types")] + public string? IntegrationTypes { get; set; } + + [Column("global_popularity_rank")] + public int GlobalPopularityRank { get; set; } + + [Column("contexts")] + public string? Contexts { get; set; } + + [Column("version", TypeName = "character varying")] + public string Version { get; set; } = null!; + + [Column("handler")] + public int Handler { get; set; } +} diff --git a/extra/admin-api/Spacebar.Db/Models/Ban.cs b/extra/admin-api/Spacebar.Db/Models/Ban.cs index 1b6665d95..bea498426 100644 --- a/extra/admin-api/Spacebar.Db/Models/Ban.cs +++ b/extra/admin-api/Spacebar.Db/Models/Ban.cs @@ -23,7 +23,7 @@ public partial class Ban public string? ExecutorId { get; set; } [Column("ip", TypeName = "character varying")] - public string Ip { get; set; } = null!; + public string? Ip { get; set; } [Column("reason", TypeName = "character varying")] public string? Reason { get; set; } diff --git a/extra/admin-api/Spacebar.Db/Models/InstanceBan.cs b/extra/admin-api/Spacebar.Db/Models/InstanceBan.cs new file mode 100644 index 000000000..92d510fb4 --- /dev/null +++ b/extra/admin-api/Spacebar.Db/Models/InstanceBan.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Spacebar.Db.Models; + +[Table("instance_bans")] +[Index("OriginInstanceBanId", Name = "REL_0b02d18d0d830f160c921192a3", IsUnique = true)] +public partial class InstanceBan +{ + [Key] + [Column("id", TypeName = "character varying")] + public string Id { get; set; } = null!; + + [Column("created_at", TypeName = "timestamp without time zone")] + public DateTime CreatedAt { get; set; } + + [Column("reason", TypeName = "character varying")] + public string Reason { get; set; } = null!; + + [Column("user_id", TypeName = "character varying")] + public string? UserId { get; set; } + + [Column("fingerprint", TypeName = "character varying")] + public string? Fingerprint { get; set; } + + [Column("ip_address", TypeName = "character varying")] + public string? IpAddress { get; set; } + + [Column("is_from_other_instance_ban")] + public bool IsFromOtherInstanceBan { get; set; } + + [Column("origin_instance_ban_id", TypeName = "character varying")] + public string? OriginInstanceBanId { get; set; } + + [Column("is_allowlisted")] + public bool IsAllowlisted { get; set; } + + [InverseProperty("OriginInstanceBan")] + public virtual InstanceBan? InverseOriginInstanceBan { get; set; } + + [ForeignKey("OriginInstanceBanId")] + [InverseProperty("InverseOriginInstanceBan")] + public virtual InstanceBan? OriginInstanceBan { get; set; } +} diff --git a/extra/admin-api/Spacebar.Db/Models/Message.cs b/extra/admin-api/Spacebar.Db/Models/Message.cs index 35de4819e..11cee7380 100644 --- a/extra/admin-api/Spacebar.Db/Models/Message.cs +++ b/extra/admin-api/Spacebar.Db/Models/Message.cs @@ -58,18 +58,12 @@ public partial class Message [Column("nonce")] public string? Nonce { get; set; } - [Column("pinned_at", TypeName = "timestamp without time zone")] - public DateTime? PinnedAt { get; set; } - [Column("type")] public int Type { get; set; } [Column("activity")] public string? Activity { get; set; } - [Column("flags")] - public int Flags { get; set; } - [Column("message_reference")] public string? MessageReference { get; set; } @@ -79,6 +73,12 @@ public partial class Message [Column("components")] public string? Components { get; set; } + [Column("message_reference_id", TypeName = "character varying")] + public string? MessageReferenceId { get; set; } + + [Column("flags")] + public int Flags { get; set; } + [Column("poll")] public string? Poll { get; set; } @@ -88,8 +88,11 @@ public partial class Message [Column("avatar", TypeName = "character varying")] public string? Avatar { get; set; } - [Column("message_reference_id", TypeName = "character varying")] - public string? MessageReferenceId { get; set; } + [Column("pinned_at", TypeName = "timestamp without time zone")] + public DateTime? PinnedAt { get; set; } + + [Column("interaction_metadata")] + public string? InteractionMetadata { get; set; } [ForeignKey("ApplicationId")] [InverseProperty("Messages")] diff --git a/extra/admin-api/Spacebar.Db/Models/Session.cs b/extra/admin-api/Spacebar.Db/Models/Session.cs index b27ad1f32..f7eda3cfe 100644 --- a/extra/admin-api/Spacebar.Db/Models/Session.cs +++ b/extra/admin-api/Spacebar.Db/Models/Session.cs @@ -20,17 +20,17 @@ public partial class Session public string SessionId { get; set; } = null!; [Column("activities")] - public string? Activities { get; set; } + public string Activities { get; set; } = null!; [Column("client_info")] public string ClientInfo { get; set; } = null!; - [Column("client_status")] - public string ClientStatus { get; set; } = null!; - [Column("status", TypeName = "character varying")] public string Status { get; set; } = null!; + [Column("client_status")] + public string ClientStatus { get; set; } = null!; + [ForeignKey("UserId")] [InverseProperty("Sessions")] public virtual User? User { get; set; } diff --git a/extra/admin-api/Spacebar.Db/Models/TeamMember.cs b/extra/admin-api/Spacebar.Db/Models/TeamMember.cs index ec1cf646f..0d5c453c4 100644 --- a/extra/admin-api/Spacebar.Db/Models/TeamMember.cs +++ b/extra/admin-api/Spacebar.Db/Models/TeamMember.cs @@ -19,15 +19,15 @@ public partial class TeamMember [Column("permissions")] public string Permissions { get; set; } = null!; - [Column("role", TypeName = "character varying")] - public string Role { get; set; } = null!; - [Column("team_id", TypeName = "character varying")] public string? TeamId { get; set; } [Column("user_id", TypeName = "character varying")] public string? UserId { get; set; } + [Column("role", TypeName = "character varying")] + public string Role { get; set; } = null!; + [ForeignKey("TeamId")] [InverseProperty("TeamMembers")] public virtual Team? Team { get; set; } diff --git a/extra/admin-api/Spacebar.Db/Models/User.cs b/extra/admin-api/Spacebar.Db/Models/User.cs index b16d3bae8..323846d46 100644 --- a/extra/admin-api/Spacebar.Db/Models/User.cs +++ b/extra/admin-api/Spacebar.Db/Models/User.cs @@ -65,9 +65,6 @@ public partial class User [Column("mfa_enabled")] public bool MfaEnabled { get; set; } - [Column("webauthn_enabled")] - public bool WebauthnEnabled { get; set; } - [Column("totp_secret", TypeName = "character varying")] public string? TotpSecret { get; set; } @@ -92,14 +89,14 @@ public partial class User [Column("email", TypeName = "character varying")] public string? Email { get; set; } - [Column("flags", TypeName = "character varying")] - public string Flags { get; set; } + [Column("flags")] + public ulong Flags { get; set; } [Column("public_flags")] public ulong PublicFlags { get; set; } [Column("purchased_flags")] - public int PurchasedFlags { get; set; } + public ulong PurchasedFlags { get; set; } [Column("premium_usage_flags")] public int PremiumUsageFlags { get; set; } @@ -116,12 +113,15 @@ public partial class User [Column("extended_settings")] public string ExtendedSettings { get; set; } = null!; - [Column("badge_ids")] - public string? BadgeIds { get; set; } - [Column("settingsIndex")] public int? SettingsIndex { get; set; } + [Column("webauthn_enabled")] + public bool WebauthnEnabled { get; set; } + + [Column("badge_ids")] + public string? BadgeIds { get; set; } + [InverseProperty("BotUser")] public virtual Application? ApplicationBotUser { get; set; } diff --git a/extra/admin-api/Spacebar.Db/Models/UserSetting.cs b/extra/admin-api/Spacebar.Db/Models/UserSetting.cs index c742b0925..5bd3354f5 100644 --- a/extra/admin-api/Spacebar.Db/Models/UserSetting.cs +++ b/extra/admin-api/Spacebar.Db/Models/UserSetting.cs @@ -52,9 +52,6 @@ public partial class UserSetting [Column("explicit_content_filter")] public int? ExplicitContentFilter { get; set; } - [Column("friend_discovery_flags")] - public int? FriendDiscoveryFlags { get; set; } - [Column("friend_source_flags")] public string? FriendSourceFlags { get; set; } @@ -109,6 +106,9 @@ public partial class UserSetting [Column("timezone_offset")] public int? TimezoneOffset { get; set; } + [Column("friend_discovery_flags")] + public int? FriendDiscoveryFlags { get; set; } + [Column("view_nsfw_guilds")] public bool? ViewNsfwGuilds { get; set; } diff --git a/extra/admin-api/Spacebar.Db/Spacebar.Db.csproj b/extra/admin-api/Spacebar.Db/Spacebar.Db.csproj index 350753bfb..2d1dcaf5b 100644 --- a/extra/admin-api/Spacebar.Db/Spacebar.Db.csproj +++ b/extra/admin-api/Spacebar.Db/Spacebar.Db.csproj @@ -7,11 +7,8 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/extra/admin-api/Spacebar.Db/deps.json b/extra/admin-api/Spacebar.Db/deps.json new file mode 100644 index 000000000..c978dd1b7 --- /dev/null +++ b/extra/admin-api/Spacebar.Db/deps.json @@ -0,0 +1,362 @@ +[ + { + "pname": "Humanizer.Core", + "version": "2.14.1", + "hash": "sha256-EXvojddPu+9JKgOG9NSQgUTfWq1RpOYw7adxDPKDJ6o=" + }, + { + "pname": "Microsoft.Build", + "version": "17.7.2", + "hash": "sha256-k35nFdPxC8t0zAltVSmAJtsepp/ubNIjPOsJ6k8jSqM=" + }, + { + "pname": "Microsoft.Build.Framework", + "version": "17.14.28", + "hash": "sha256-7RzEyIipumafwLW1xN1q23114NafG6PT0+RADElNsiM=" + }, + { + "pname": "Microsoft.Build.Framework", + "version": "17.7.2", + "hash": "sha256-fNWmVQYFTJDveAGmxEdNqJRAczV6+Ep8RA8clKBJFqw=" + }, + { + "pname": "Microsoft.Build.Tasks.Core", + "version": "17.14.28", + "hash": "sha256-M9zRXYijH2HtLlRXbrUK1a1LQ9zkT+DC9ZmMiiVZwv0=" + }, + { + "pname": "Microsoft.Build.Tasks.Core", + "version": "17.7.2", + "hash": "sha256-OrV/qWgZHzGlNUmaSfX5wDBcmg1aQeF3/OUHpSH+uZU=" + }, + { + "pname": "Microsoft.Build.Utilities.Core", + "version": "17.14.28", + "hash": "sha256-VFfO+UpyTpw2X/qiCCOCYzvMLuu7B+XVSSpJZQLkPzU=" + }, + { + "pname": "Microsoft.Build.Utilities.Core", + "version": "17.7.2", + "hash": "sha256-oatF0KfuP1nb4+OLNKg2/R/ZLO4EiACaO5leaxMEY4A=" + }, + { + "pname": "Microsoft.CodeAnalysis.Analyzers", + "version": "3.11.0", + "hash": "sha256-hQ2l6E6PO4m7i+ZsfFlEx+93UsLPo4IY3wDkNG11/Sw=" + }, + { + "pname": "Microsoft.CodeAnalysis.Common", + "version": "4.14.0", + "hash": "sha256-ne/zxH3GqoGB4OemnE8oJElG5mai+/67ASaKqwmL2BE=" + }, + { + "pname": "Microsoft.CodeAnalysis.CSharp", + "version": "4.14.0", + "hash": "sha256-5Mzj3XkYYLkwDWh17r1NEXSbXwwWYQPiOmkSMlgo1JY=" + }, + { + "pname": "Microsoft.CodeAnalysis.CSharp.Workspaces", + "version": "4.14.0", + "hash": "sha256-aNbV1a0yYBs0fpQawG6LXcbyoE8en+YFSpV5vcYE4J4=" + }, + { + "pname": "Microsoft.CodeAnalysis.Workspaces.Common", + "version": "4.14.0", + "hash": "sha256-0YfeaJe01WBUm9avy4a8FacQJXA1NkpnDpiXu4yz88I=" + }, + { + "pname": "Microsoft.CodeAnalysis.Workspaces.MSBuild", + "version": "4.14.0", + "hash": "sha256-5SJfpRqzqCK0UbkmAaJpA/r1XJb0YAriMMeQHYC4d+o=" + }, + { + "pname": "Microsoft.EntityFrameworkCore", + "version": "10.0.0", + "hash": "sha256-xfgrlxhtOkQwF5Q7j8gSm41URJiH8IuJ/T/Dh88++hE=" + }, + { + "pname": "Microsoft.EntityFrameworkCore", + "version": "10.0.1", + "hash": "sha256-IxA+/nDA6hZkUm9bDT6bRu8+9qeHA3gbTvIhR9Ncg4w=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Abstractions", + "version": "10.0.0", + "hash": "sha256-UDgZbRQcGPaKsE53EH6bvJiv+Q4KSxAbnsVhTVFGG4Q=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Abstractions", + "version": "10.0.1", + "hash": "sha256-FMGXhAAgcVSedV0/GmUVqAwoiRzFJil9mQYr6eNgowg=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Analyzers", + "version": "10.0.0", + "hash": "sha256-7Q0jYJO50cqGI+u6gLpootbB8GZvgsgtg0F9FZI1jig=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Analyzers", + "version": "10.0.1", + "hash": "sha256-O949vr98WoSRXtiIo0ZI6dz2cibIBKbiuC+mQOe9bV4=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Design", + "version": "10.0.1", + "hash": "sha256-GGNZIGNEMhSGaMRFkRN4bOuCUBs5YVnX8klXarm319U=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Relational", + "version": "10.0.0", + "hash": "sha256-vOP2CE5YA551BlpbOuIy6RuAiAEPEpCVS1cEE33/zN4=" + }, + { + "pname": "Microsoft.EntityFrameworkCore.Relational", + "version": "10.0.1", + "hash": "sha256-zLgxr/iW9HP8Fip1IDgr7X0Ar8OWKDvVmoEt65gG6VY=" + }, + { + "pname": "Microsoft.Extensions.Caching.Abstractions", + "version": "10.0.1", + "hash": "sha256-qVLAEqxPK/dNq+z1a6D9NqdcSg/18sfzZhlBWMkqV/A=" + }, + { + "pname": "Microsoft.Extensions.Caching.Memory", + "version": "10.0.0", + "hash": "sha256-AMgDSm1k6q0s17spGtyR5q8nAqUFDOxl/Fe38f9M+d4=" + }, + { + "pname": "Microsoft.Extensions.Caching.Memory", + "version": "10.0.1", + "hash": "sha256-Qb7xK6VEZDas0lJFaW1suKdFjtkSYwLHHxkQEfWIU2A=" + }, + { + "pname": "Microsoft.Extensions.Configuration.Abstractions", + "version": "10.0.1", + "hash": "sha256-s4PDp+vtzdxKIxnOT3+dDRoTDopyl8kqmmw4KDnkOtQ=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection", + "version": "10.0.1", + "hash": "sha256-RKOB+zPrtQNUbJY/1jR54rKOM8KHPgynPExxugku3I8=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection", + "version": "9.0.0", + "hash": "sha256-dAH52PPlTLn7X+1aI/7npdrDzMEFPMXRv4isV1a+14k=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection.Abstractions", + "version": "10.0.1", + "hash": "sha256-zNUpau51ds7iQTaSUTFtyTHIUoinYc129W50CnufMdQ=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection.Abstractions", + "version": "9.0.0", + "hash": "sha256-CncVwkKZ5CsIG2O0+OM9qXuYXh3p6UGyueTHSLDVL+c=" + }, + { + "pname": "Microsoft.Extensions.DependencyModel", + "version": "10.0.1", + "hash": "sha256-XIj2jEURe25YA4RhBSuCqQpic0YP+TZaO/dbBPCjad8=" + }, + { + "pname": "Microsoft.Extensions.Logging", + "version": "10.0.0", + "hash": "sha256-P+zPAadLL63k/GqK34/qChqQjY9aIRxZfxlB9lqsSrs=" + }, + { + "pname": "Microsoft.Extensions.Logging", + "version": "10.0.1", + "hash": "sha256-zuLP3SIpCToMOlIPOEv3Kq8y/minecd8k8GSkxFo13E=" + }, + { + "pname": "Microsoft.Extensions.Logging", + "version": "9.0.0", + "hash": "sha256-kR16c+N8nQrWeYLajqnXPg7RiXjZMSFLnKLEs4VfjcM=" + }, + { + "pname": "Microsoft.Extensions.Logging.Abstractions", + "version": "10.0.0", + "hash": "sha256-BnhgGZc01HwTSxogavq7Ueq4V7iMA3wPnbfRwQ4RhGk=" + }, + { + "pname": "Microsoft.Extensions.Logging.Abstractions", + "version": "10.0.1", + "hash": "sha256-NRk0feNE1fgi/hyO0AVDbSGJQRT+9yte6Lpm4Hz/2Bs=" + }, + { + "pname": "Microsoft.Extensions.Logging.Abstractions", + "version": "9.0.0", + "hash": "sha256-iBTs9twjWXFeERt4CErkIIcoJZU1jrd1RWCI8V5j7KU=" + }, + { + "pname": "Microsoft.Extensions.Options", + "version": "10.0.1", + "hash": "sha256-vBiSS1vqAC7eDrpJNT4H3A9qLikCSAepnNRbry0mKnk=" + }, + { + "pname": "Microsoft.Extensions.Options", + "version": "9.0.0", + "hash": "sha256-DT5euAQY/ItB5LPI8WIp6Dnd0lSvBRP35vFkOXC68ck=" + }, + { + "pname": "Microsoft.Extensions.Primitives", + "version": "10.0.1", + "hash": "sha256-EXmukq09erT4s+miQpBSYy3IY4HxxKlwEPL43/KoyEc=" + }, + { + "pname": "Microsoft.Extensions.Primitives", + "version": "9.0.0", + "hash": "sha256-ZNLusK1CRuq5BZYZMDqaz04PIKScE2Z7sS2tehU7EJs=" + }, + { + "pname": "Microsoft.NET.StringTools", + "version": "17.14.28", + "hash": "sha256-UzREyvDxkiOQ4cEOQ5UCjkwXGrldIDCcbefECTPGjXI=" + }, + { + "pname": "Microsoft.NET.StringTools", + "version": "17.7.2", + "hash": "sha256-hQE07TCgcQuyu9ZHVq2gPDb0+xe8ECJUdrgh17bJP4o=" + }, + { + "pname": "Mono.TextTemplating", + "version": "3.0.0", + "hash": "sha256-VlgGDvgNZb7MeBbIZ4DE2Nn/j2aD9k6XqNHnASUSDr0=" + }, + { + "pname": "Newtonsoft.Json", + "version": "13.0.3", + "hash": "sha256-hy/BieY4qxBWVVsDqqOPaLy1QobiIapkbrESm6v2PHc=" + }, + { + "pname": "Npgsql", + "version": "10.0.0", + "hash": "sha256-UVKz9dH/rVCCbMyFdqA31RYpht1XgDRLIqUy0Dp9ACQ=" + }, + { + "pname": "Npgsql.EntityFrameworkCore.PostgreSQL", + "version": "10.0.0", + "hash": "sha256-XIJxnTMektQVP1qtslEIGbmBGrIQsvjQjCMRTs9UIbg=" + }, + { + "pname": "System.CodeDom", + "version": "6.0.0", + "hash": "sha256-uPetUFZyHfxjScu5x4agjk9pIhbCkt5rG4Axj25npcQ=" + }, + { + "pname": "System.CodeDom", + "version": "7.0.0", + "hash": "sha256-7IPt39cY+0j0ZcRr/J45xPtEjnSXdUJ/5ai3ebaYQiE=" + }, + { + "pname": "System.CodeDom", + "version": "9.0.0", + "hash": "sha256-578lcBgswW0eM16r0EnJzfGodPx86RxxFoZHc2PSzsw=" + }, + { + "pname": "System.Composition", + "version": "9.0.0", + "hash": "sha256-FehOkQ2u1p8mQ0/wn3cZ+24HjhTLdck8VZYWA1CcgbM=" + }, + { + "pname": "System.Composition.AttributedModel", + "version": "9.0.0", + "hash": "sha256-a7y7H6zj+kmYkllNHA402DoVfY9IaqC3Ooys8Vzl24M=" + }, + { + "pname": "System.Composition.Convention", + "version": "9.0.0", + "hash": "sha256-tw4vE5JRQ60ubTZBbxoMPhtjOQCC3XoDFUH7NHO7o8U=" + }, + { + "pname": "System.Composition.Hosting", + "version": "9.0.0", + "hash": "sha256-oOxU+DPEEfMCuNLgW6wSkZp0JY5gYt44FJNnWt+967s=" + }, + { + "pname": "System.Composition.Runtime", + "version": "9.0.0", + "hash": "sha256-AyIe+di1TqwUBbSJ/sJ8Q8tzsnTN+VBdJw4K8xZz43s=" + }, + { + "pname": "System.Composition.TypedParts", + "version": "9.0.0", + "hash": "sha256-F5fpTUs3Rr7yP/NyIzr+Xn5NdTXXp8rrjBnF9UBBUog=" + }, + { + "pname": "System.Configuration.ConfigurationManager", + "version": "7.0.0", + "hash": "sha256-SgBexTTjRn23uuXvkzO0mz0qOfA23MiS4Wv+qepMLZE=" + }, + { + "pname": "System.Configuration.ConfigurationManager", + "version": "9.0.0", + "hash": "sha256-+pLnTC0YDP6Kjw5DVBiFrV/Q3x5is/+6N6vAtjvhVWk=" + }, + { + "pname": "System.Diagnostics.EventLog", + "version": "9.0.0", + "hash": "sha256-tPvt6yoAp56sK/fe+/ei8M65eavY2UUhRnbrREj/Ems=" + }, + { + "pname": "System.Formats.Nrbf", + "version": "9.0.0", + "hash": "sha256-c4qf6CocQUZB0ySGQd8s15PXY7xfrjQqMGXxkwytKyw=" + }, + { + "pname": "System.Reflection.MetadataLoadContext", + "version": "7.0.0", + "hash": "sha256-VYl6SFD130K9Aw4eJH16ApJ9Sau4Xu0dcxEip2veuTI=" + }, + { + "pname": "System.Resources.Extensions", + "version": "9.0.0", + "hash": "sha256-y2gLEMuAy6QfEyNJxABC/ayMWGnwlpX735jsUQLktho=" + }, + { + "pname": "System.Security.Cryptography.Pkcs", + "version": "7.0.0", + "hash": "sha256-3J3vL9hcKSuZjT2GKappa2A9p2xJm1nH2asTNAl8ZCA=" + }, + { + "pname": "System.Security.Cryptography.Pkcs", + "version": "7.0.2", + "hash": "sha256-qS5Z/Yo8J+f3ExVX5Qkcpj1Z57oUZqz5rWa1h5bVpl8=" + }, + { + "pname": "System.Security.Cryptography.Pkcs", + "version": "9.0.0", + "hash": "sha256-AjG14mGeSc2Ka4QSelGBM1LrGBW3VJX60lnihKyJjGY=" + }, + { + "pname": "System.Security.Cryptography.ProtectedData", + "version": "9.0.0", + "hash": "sha256-gPgPU7k/InTqmXoRzQfUMEKL3QuTnOKowFqmXTnWaBQ=" + }, + { + "pname": "System.Security.Cryptography.Xml", + "version": "7.0.1", + "hash": "sha256-CH8+JVC8LyCSW75/6ZQ7ecMbSOAE1c16z4dG8JTp01w=" + }, + { + "pname": "System.Security.Cryptography.Xml", + "version": "9.0.0", + "hash": "sha256-SQJWwAFrJUddEU6JiZB52FM9tGjRlJAYH8oYVzG5IJU=" + }, + { + "pname": "System.Security.Permissions", + "version": "7.0.0", + "hash": "sha256-DOFoX+AKRmrkllykHheR8FfUXYx/Ph+I/HYuReQydXI=" + }, + { + "pname": "System.Security.Permissions", + "version": "9.0.0", + "hash": "sha256-BFrA9ottmQtLIAiKiGRbfSUpzNJwuaOCeFRDN4Z0ku0=" + }, + { + "pname": "System.Windows.Extensions", + "version": "9.0.0", + "hash": "sha256-RErD+Ju15qtnwdwB7E0SjjJGAnhXwJyC7UPcl24Z3Vs=" + } +] diff --git a/extra/admin-api/SpacebarAdminAPI.sln b/extra/admin-api/SpacebarAdminAPI.sln index 09e3a6969..723939d00 100644 --- a/extra/admin-api/SpacebarAdminAPI.sln +++ b/extra/admin-api/SpacebarAdminAPI.sln @@ -5,15 +5,15 @@ VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.Db", "Spacebar.Db\Spacebar.Db.csproj", "{524849DF-93BC-4632-B6C2-D05552C13887}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.AdminAPI", "Spacebar.AdminAPI\Spacebar.AdminAPI.csproj", "{00E58C53-0AC1-4113-8CCF-D299861EA8D3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.AdminApi", "Spacebar.AdminApi\Spacebar.AdminApi.csproj", "{00E58C53-0AC1-4113-8CCF-D299861EA8D3}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utilities", "Utilities", "{04787943-EBB6-4DE4-96D5-4CFB4A2CEE99}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.RabbitMqUtilities", "Utilities\Spacebar.RabbitMqUtilities\Spacebar.RabbitMqUtilities.csproj", "{F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.AdminAPITest", "Utilities\Spacebar.AdminAPITest\Spacebar.AdminAPITest.csproj", "{374314B2-7149-4316-8750-4E1E7BF6C3B4}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.AdminApiTest", "Utilities\Spacebar.AdminApiTest\Spacebar.AdminApiTest.csproj", "{374314B2-7149-4316-8750-4E1E7BF6C3B4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.AdminAPI.TestClient", "Utilities\Spacebar.AdminAPI.TestClient\Spacebar.AdminAPI.TestClient.csproj", "{498DAD05-336E-4851-ABD8-4E7CCA8312B0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.AdminApi.TestClient", "Utilities\Spacebar.AdminApi.TestClient\Spacebar.AdminApi.TestClient.csproj", "{498DAD05-336E-4851-ABD8-4E7CCA8312B0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.AdminApi.Models", "Spacebar.AdminApi.Models\Spacebar.AdminApi.Models.csproj", "{5F138C70-EAFA-4C7C-8B90-EFB9624B235C}" EndProject @@ -21,6 +21,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.AdminApi.PrepareTe EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.CleanSettingsRows", "Spacebar.CleanSettingsRows\Spacebar.CleanSettingsRows.csproj", "{9B41FAC1-4427-487C-BF3F-69554848DEBF}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.ConfigModel", "Spacebar.ConfigModel\Spacebar.ConfigModel.csproj", "{EC5C6A71-458A-4A1D-BE96-CCB84FF4AF1B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigTest", "ConfigTest\ConfigTest.csproj", "{3BB51E17-8D3E-42FE-AAE6-C33DA5D8D323}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -62,6 +66,14 @@ Global {9B41FAC1-4427-487C-BF3F-69554848DEBF}.Debug|Any CPU.Build.0 = Debug|Any CPU {9B41FAC1-4427-487C-BF3F-69554848DEBF}.Release|Any CPU.ActiveCfg = Release|Any CPU {9B41FAC1-4427-487C-BF3F-69554848DEBF}.Release|Any CPU.Build.0 = Release|Any CPU + {EC5C6A71-458A-4A1D-BE96-CCB84FF4AF1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC5C6A71-458A-4A1D-BE96-CCB84FF4AF1B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC5C6A71-458A-4A1D-BE96-CCB84FF4AF1B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC5C6A71-458A-4A1D-BE96-CCB84FF4AF1B}.Release|Any CPU.Build.0 = Release|Any CPU + {3BB51E17-8D3E-42FE-AAE6-C33DA5D8D323}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3BB51E17-8D3E-42FE-AAE6-C33DA5D8D323}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3BB51E17-8D3E-42FE-AAE6-C33DA5D8D323}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3BB51E17-8D3E-42FE-AAE6-C33DA5D8D323}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2} = {04787943-EBB6-4DE4-96D5-4CFB4A2CEE99} diff --git a/extra/admin-api/Utilities/Spacebar.AdminAPI.TestClient/App.razor b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/App.razor similarity index 100% rename from extra/admin-api/Utilities/Spacebar.AdminAPI.TestClient/App.razor rename to extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/App.razor diff --git a/extra/admin-api/Utilities/Spacebar.AdminAPI.TestClient/Classes/OpenAPI/OpenAPISchema.cs b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Classes/OpenAPI/OpenAPISchema.cs similarity index 99% rename from extra/admin-api/Utilities/Spacebar.AdminAPI.TestClient/Classes/OpenAPI/OpenAPISchema.cs rename to extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Classes/OpenAPI/OpenAPISchema.cs index 8e399302e..8995dee5f 100644 --- a/extra/admin-api/Utilities/Spacebar.AdminAPI.TestClient/Classes/OpenAPI/OpenAPISchema.cs +++ b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Classes/OpenAPI/OpenAPISchema.cs @@ -2,7 +2,7 @@ using System.Collections.Frozen; using System.Text.Json; using System.Text.Json.Serialization; -namespace Spacebar.AdminAPI.TestClient.Classes.OpenAPI; +namespace Spacebar.AdminApi.TestClient.Classes.OpenAPI; public class OpenApiSchema { [JsonPropertyName("openapi")] diff --git a/extra/admin-api/Utilities/Spacebar.AdminAPI.TestClient/Layout/MainLayout.razor b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Layout/MainLayout.razor similarity index 100% rename from extra/admin-api/Utilities/Spacebar.AdminAPI.TestClient/Layout/MainLayout.razor rename to extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Layout/MainLayout.razor diff --git a/extra/admin-api/Utilities/Spacebar.AdminAPI.TestClient/Layout/MainLayout.razor.css b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Layout/MainLayout.razor.css similarity index 100% rename from extra/admin-api/Utilities/Spacebar.AdminAPI.TestClient/Layout/MainLayout.razor.css rename to extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Layout/MainLayout.razor.css diff --git a/extra/admin-api/Utilities/Spacebar.AdminAPI.TestClient/Layout/NavMenu.razor b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Layout/NavMenu.razor similarity index 96% rename from extra/admin-api/Utilities/Spacebar.AdminAPI.TestClient/Layout/NavMenu.razor rename to extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Layout/NavMenu.razor index c96fa30c4..96deb070b 100644 --- a/extra/admin-api/Utilities/Spacebar.AdminAPI.TestClient/Layout/NavMenu.razor +++ b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Layout/NavMenu.razor @@ -1,6 +1,6 @@