2026-10-04 11:03:14 +02:00
|
|
|
using System.Text.Json.Serialization;
|
2026-10-03 15:26:21 +02:00
|
|
|
|
|
|
|
|
using decePubClient.Models;
|
|
|
|
|
|
|
|
|
|
using PrivaPub.ClientModels;
|
2026-10-05 06:20:18 +02:00
|
|
|
using PrivaPub.ClientModels.Admin;
|
2026-10-04 11:03:14 +02:00
|
|
|
using PrivaPub.ClientModels.Group;
|
|
|
|
|
using PrivaPub.ClientModels.Post;
|
|
|
|
|
using PrivaPub.ClientModels.User;
|
|
|
|
|
using PrivaPub.ClientModels.User.Avatar;
|
2026-10-03 15:26:21 +02:00
|
|
|
|
|
|
|
|
namespace decePubClient;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Source-generated JSON metadata for the client's own types, used first by SUtility.DefaultSerializer (HTTP) and by
|
|
|
|
|
/// Blazored.LocalStorage (Program.cs). Register every type that crosses HTTP or is stored in localStorage here; types
|
|
|
|
|
/// missing from it still work through the reflection fallback. Names stay camelCase: wwwroot/js/theme.js reads
|
|
|
|
|
/// PublicCacheData.pageSettings straight from localStorage.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
|
|
|
|
|
IgnoreReadOnlyProperties = true)]
|
|
|
|
|
[JsonSerializable(typeof(PublicCacheData))]
|
|
|
|
|
[JsonSerializable(typeof(PageSettings))]
|
|
|
|
|
[JsonSerializable(typeof(AuthData))]
|
2026-10-04 11:03:14 +02:00
|
|
|
[JsonSerializable(typeof(FeedFilter))]
|
2026-10-05 01:23:18 +02:00
|
|
|
[JsonSerializable(typeof(PublicActionNotices))]
|
2026-10-04 11:03:14 +02:00
|
|
|
[JsonSerializable(typeof(ServerInfo))]
|
|
|
|
|
[JsonSerializable(typeof(List<ServerInfo>))]
|
2026-10-03 15:26:21 +02:00
|
|
|
[JsonSerializable(typeof(UploadMedia))]
|
|
|
|
|
[JsonSerializable(typeof(ValidationErrors))]
|
|
|
|
|
[JsonSerializable(typeof(WebResult))]
|
2026-10-04 11:03:14 +02:00
|
|
|
[JsonSerializable(typeof(LoginForm))]
|
2026-10-16 23:21:48 +02:00
|
|
|
[JsonSerializable(typeof(SetupForm))]
|
|
|
|
|
[JsonSerializable(typeof(InvitationLoginForm))]
|
|
|
|
|
[JsonSerializable(typeof(ViewServerSetup))]
|
2026-10-05 18:32:47 +02:00
|
|
|
[JsonSerializable(typeof(UserPasswordForm))]
|
|
|
|
|
[JsonSerializable(typeof(RemoveSelfForm))]
|
2026-10-17 03:21:59 +02:00
|
|
|
[JsonSerializable(typeof(PasswordRecoveryForm))]
|
|
|
|
|
[JsonSerializable(typeof(NewPasswordForm))]
|
|
|
|
|
[JsonSerializable(typeof(ViewAccount))]
|
|
|
|
|
[JsonSerializable(typeof(EmailChangeForm))]
|
|
|
|
|
[JsonSerializable(typeof(EmailCodeForm))]
|
|
|
|
|
[JsonSerializable(typeof(PasswordForm))]
|
2026-10-17 03:33:46 +02:00
|
|
|
[JsonSerializable(typeof(TotpCodeForm))]
|
|
|
|
|
[JsonSerializable(typeof(TotpDisableForm))]
|
|
|
|
|
[JsonSerializable(typeof(ViewTotpSetup))]
|
|
|
|
|
[JsonSerializable(typeof(ViewTotpEnabled))]
|
2026-10-17 03:21:59 +02:00
|
|
|
[JsonSerializable(typeof(ViewUserSettings))]
|
|
|
|
|
// recover/valid takes the code as a JSON string ([FromBody] string) and answers a JSON bool
|
|
|
|
|
[JsonSerializable(typeof(string))]
|
|
|
|
|
[JsonSerializable(typeof(bool))]
|
2026-10-04 11:03:14 +02:00
|
|
|
[JsonSerializable(typeof(JwtUser))]
|
|
|
|
|
[JsonSerializable(typeof(ViewAvatar))]
|
|
|
|
|
[JsonSerializable(typeof(List<ViewAvatar>))]
|
2026-10-05 06:20:18 +02:00
|
|
|
[JsonSerializable(typeof(InsertAvatarForm))]
|
2026-10-04 11:03:14 +02:00
|
|
|
[JsonSerializable(typeof(ViewGroup))]
|
|
|
|
|
[JsonSerializable(typeof(List<ViewGroup>))]
|
2026-10-05 18:24:39 +02:00
|
|
|
[JsonSerializable(typeof(ViewGroupMember))]
|
|
|
|
|
[JsonSerializable(typeof(List<ViewGroupMember>))]
|
|
|
|
|
[JsonSerializable(typeof(InsertGroupForm))]
|
|
|
|
|
[JsonSerializable(typeof(UpdateGroupForm))]
|
|
|
|
|
[JsonSerializable(typeof(JoinGroupForm))]
|
|
|
|
|
[JsonSerializable(typeof(GroupMembershipForm))]
|
2026-10-04 11:03:14 +02:00
|
|
|
[JsonSerializable(typeof(ViewPost))]
|
|
|
|
|
[JsonSerializable(typeof(List<ViewPost>))]
|
|
|
|
|
[JsonSerializable(typeof(InsertPostForm))]
|
2026-10-07 02:14:53 +02:00
|
|
|
[JsonSerializable(typeof(DeletePostForm))]
|
2026-10-05 06:20:18 +02:00
|
|
|
[JsonSerializable(typeof(ViewReport))]
|
|
|
|
|
[JsonSerializable(typeof(List<ViewReport>))]
|
|
|
|
|
[JsonSerializable(typeof(DomainBlockForm))]
|
|
|
|
|
[JsonSerializable(typeof(ViewDomainBlock))]
|
|
|
|
|
[JsonSerializable(typeof(List<ViewDomainBlock>))]
|
|
|
|
|
[JsonSerializable(typeof(ViewStatisticsOverview))]
|
|
|
|
|
[JsonSerializable(typeof(ViewHostsPage))]
|
|
|
|
|
[JsonSerializable(typeof(ViewCrawler))]
|
2026-10-17 04:02:20 +02:00
|
|
|
[JsonSerializable(typeof(ViewHostDetail))]
|
|
|
|
|
[JsonSerializable(typeof(ViewHostInstance))]
|
|
|
|
|
[JsonSerializable(typeof(ViewHostDay))]
|
|
|
|
|
[JsonSerializable(typeof(ViewInteractionEvent))]
|
|
|
|
|
[JsonSerializable(typeof(List<ViewInteractionEvent>))]
|
|
|
|
|
[JsonSerializable(typeof(ViewServerDay))]
|
|
|
|
|
[JsonSerializable(typeof(List<ViewServerDay>))]
|
2026-10-07 12:45:30 +02:00
|
|
|
[JsonSerializable(typeof(ViewBackups))]
|
|
|
|
|
[JsonSerializable(typeof(ViewBackup))]
|
|
|
|
|
[JsonSerializable(typeof(BackupPasswordForm))]
|
|
|
|
|
[JsonSerializable(typeof(RestoreBackupForm))]
|
|
|
|
|
[JsonSerializable(typeof(ViewBackupTicket))]
|
|
|
|
|
[JsonSerializable(typeof(ViewBackupUpload))]
|
2026-10-07 12:49:51 +02:00
|
|
|
[JsonSerializable(typeof(ViewPersonaArchive))]
|
|
|
|
|
[JsonSerializable(typeof(ImportPersonaArchiveForm))]
|
|
|
|
|
[JsonSerializable(typeof(ViewArchiveTicket))]
|
|
|
|
|
[JsonSerializable(typeof(ViewArchiveUpload))]
|
2026-10-17 04:32:57 +02:00
|
|
|
[JsonSerializable(typeof(ViewServerSettings))]
|
|
|
|
|
[JsonSerializable(typeof(ServerSettingsForm))]
|
|
|
|
|
[JsonSerializable(typeof(ViewAnnouncement))]
|
|
|
|
|
[JsonSerializable(typeof(List<ViewAnnouncement>))]
|
|
|
|
|
[JsonSerializable(typeof(AnnouncementForm))]
|
|
|
|
|
[JsonSerializable(typeof(ViewRelay))]
|
|
|
|
|
[JsonSerializable(typeof(List<ViewRelay>))]
|
|
|
|
|
[JsonSerializable(typeof(RelayForm))]
|
|
|
|
|
[JsonSerializable(typeof(ViewAdminActionsPage))]
|
2026-10-03 15:26:21 +02:00
|
|
|
public partial class ClientJsonContext : JsonSerializerContext
|
|
|
|
|
{
|
|
|
|
|
}
|