Files
vtuber-awards/Backend/Contracts/AdminSiteSettingsContracts.cs
AzuTear 6b3b0360e7
CI - Build & Verify / Build, Typecheck & Hygiene (push) Successful in 1m1s
CI - Build & Verify / Deploy to award.noveria.net (push) Successful in 1m30s
Add winner archive, host image upload and live demo data
Deliver the demo-ready feature set and seed data so the live site can be
presented end to end:

- Winner archive: ArchivedWinner domain, admin CRUD endpoints/view/manager
  and public archive surface, backed by AddArchivedWinners migration.
- Host presentation: host image upload and artist name on SiteSettings with
  public image endpoint and supporting migrations.
- Clip submissions: idempotent table-ensure migration plus current-season
  demo clips for review workflows.
- Demo seed data: sponsors, share links and 2025 archived winners, with a
  guarded RemoveDemoSeasons cleanup; all seeds guard against real data.
- EnsureRuntimeSchemaParity migration to align runtime schema defensively.
- Admin/home UI refinements; remove unused team role permissions modal and
  dead share-quick-links code.

All seed and schema migrations are idempotent (IF NOT EXISTS / ON CONFLICT)
and skip when real season data is present.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 21:47:52 +02:00

199 lines
6.1 KiB
C#

namespace Backend.Contracts;
public sealed record AdminSiteSettingsResponse(
string HostDisplayName,
string HostTagline,
string HostArtistName,
string HostImageUrl,
string NewsletterUrl,
string ShareXUrl,
string ShareDiscordUrl,
string PrivacyEmail,
string PrivacyPolicyContent,
string? PrivacyPolicyUpdatedBy,
DateTimeOffset? PrivacyPolicyUpdatedAt,
string ImprintUrl,
string ImprintContent,
string ContactUrl,
string ContactContent,
string SponsorsUrl,
string SponsorsContent,
string ShowactsUrl,
string ShowactsContent,
string StreamBannerEyebrow,
string StreamBannerTitle,
string StreamBannerText,
string StreamBannerLiveButtonLabel,
string StreamBannerLiveButtonUrl,
string StreamBannerLockedButtonLabel,
bool StreamBannerUseCompletedContent,
string StreamBannerCompletedEyebrow,
string StreamBannerCompletedTitle,
string StreamBannerCompletedText,
string StreamBannerCompletedButtonLabel,
string StreamBannerCompletedButtonUrl,
string AwardsSectionTitle,
string AwardsSectionDescription,
string SubcategoriesSectionTitle,
string SubcategoriesSectionDescription,
IEnumerable<PublicSocialLinkDto> SocialLinks,
IEnumerable<FaqItemDto> Faq,
string ShowactFormSchemaJson);
public sealed record UpdateSiteSettingsRequest(
string HostDisplayName,
string HostTagline,
string HostArtistName,
string NewsletterUrl,
string ShareXUrl,
string ShareDiscordUrl,
string PrivacyEmail,
string PrivacyPolicyContent,
string ImprintUrl,
string ImprintContent,
string ContactUrl,
string ContactContent,
string SponsorsUrl,
string SponsorsContent,
string ShowactsUrl,
string ShowactsContent,
string StreamBannerEyebrow,
string StreamBannerTitle,
string StreamBannerText,
string StreamBannerLiveButtonLabel,
string StreamBannerLiveButtonUrl,
string StreamBannerLockedButtonLabel,
bool StreamBannerUseCompletedContent,
string StreamBannerCompletedEyebrow,
string StreamBannerCompletedTitle,
string StreamBannerCompletedText,
string StreamBannerCompletedButtonLabel,
string StreamBannerCompletedButtonUrl,
string AwardsSectionTitle,
string AwardsSectionDescription,
string SubcategoriesSectionTitle,
string SubcategoriesSectionDescription,
PublicSocialLinkDto[] SocialLinks,
FaqItemDto[] Faq,
string? ShowactFormSchemaJson = null);
public sealed record AdminOperationalSettingsResponse(
bool DemoLoginManagedByDatabase,
bool DemoLoginEnabled,
string DemoLoginEmail,
bool DemoLoginPasswordSet,
string DemoLoginTwitchUserId,
string DemoLoginDisplayName,
bool TwitchAuthManagedByDatabase,
bool TwitchAuthConfigured,
string TwitchClientId,
bool TwitchClientSecretSet,
string TwitchRedirectUri,
string TwitchScope,
int SessionIdleTimeoutHours,
bool MaintenanceModeEnabled,
string MaintenanceTitle,
string MaintenanceMessage);
public sealed record AdminOptionalFeatureSettingsResponse(
bool ClipSubmissionsEnabled,
bool ClipReviewEnabled,
bool ClipAdminMenuVisible,
string ClipSubmissionDisabledMessage,
bool ShowactApplicationsEnabled,
DateOnly? ShowactApplicationStartsAt,
DateOnly? ShowactApplicationEndsAt,
bool ShowactApplicationsOpenNow,
string ShowactApplicationDisabledMessage,
bool SponsorsVisible);
public sealed record UpdateOptionalFeatureSettingsRequest(
bool ClipSubmissionsEnabled,
bool ClipReviewEnabled,
bool ClipAdminMenuVisible,
string ClipSubmissionDisabledMessage,
bool ShowactApplicationsEnabled,
DateOnly? ShowactApplicationStartsAt,
DateOnly? ShowactApplicationEndsAt,
string ShowactApplicationDisabledMessage,
bool SponsorsVisible);
public sealed record UpdateOperationalSettingsRequest(
bool DemoLoginEnabled,
string DemoLoginEmail,
string? DemoLoginPassword,
string DemoLoginTwitchUserId,
string DemoLoginDisplayName,
string TwitchClientId,
string? TwitchClientSecret,
string TwitchRedirectUri,
string TwitchScope,
int SessionIdleTimeoutHours,
bool MaintenanceModeEnabled,
string MaintenanceTitle,
string MaintenanceMessage);
public sealed record AdminTrackingSourceDto(
string ProviderKey,
string ProviderLabel,
string BaseUrl,
string NotesSummary,
bool ShowManualReviewNotesInReview);
public sealed record AdminTrackingMetricRuleDto(
string Key,
string Label,
bool Enabled,
string SourceSupport,
string Description,
bool RequiredForAutoClassification,
bool ShowInReview,
bool ShowInAdminSummary,
bool ManualOverrideAllowed,
string WindowKey,
string[] AutoSupportedWindowKeys,
string? ProviderFieldKey,
int? TopCount,
int? MinPrimaryCategorySharePercent,
int? MinPrimaryCategoryHours,
int? MaxDistinctCategoriesBeforeFlag,
string[] IgnoredCategories,
bool MatchAwardCategoryAgainstTopCategories,
bool FlagIfAwardCategoryNotInTopX,
bool FlagIfCategorySpreadTooWide,
bool FlagIfNoCategoryContextAvailable,
int? MinValue,
int? MaxValue);
public sealed record AdminTrackingFlagRuleDto(
string Key,
string Label,
bool Enabled,
string Severity,
string Description,
bool AutoTriggerEnabled,
bool RequiresManualReview,
bool BlocksApproval,
bool AdminNoteRequiredOnOverride);
public sealed record AdminTrackingRulesResponse(
AdminTrackingSourceDto Source,
AdminTrackingMetricRuleDto[] ImportantMetrics,
AdminTrackingMetricRuleDto[] OptionalMetrics,
AdminTrackingFlagRuleDto[] Flags,
string ManualReviewNotes);
public sealed record UpdateTrackingRulesRequest(
AdminTrackingSourceDto Source,
AdminTrackingMetricRuleDto[] ImportantMetrics,
AdminTrackingMetricRuleDto[] OptionalMetrics,
AdminTrackingFlagRuleDto[] Flags,
string ManualReviewNotes);
public sealed record UpdateTrackingSourceRequest(
AdminTrackingSourceDto Source);
public sealed record UpdateTrackingReviewNotesRequest(
string ManualReviewNotes,
bool ShowManualReviewNotesInReview);