feat: hardcover sync for per user reading status progress and rating (#53)

* feat(server): sync reading progress with Hardcover

* fix(server): update Hardcover sync pending state

* test(server): cover Hardcover admin and repository
This commit is contained in:
Chris Mansell
2026-05-19 10:49:15 -06:00
committed by GitHub
parent 402d1cde5d
commit 418314352e
50 changed files with 14625 additions and 7 deletions
+43
View File
@@ -0,0 +1,43 @@
export interface HardcoverSettings {
tokenConfigured: boolean;
enabled: boolean;
autoSyncOnStatusChange: boolean;
autoSyncOnProgressUpdate: boolean;
autoSyncOnRatingChange: boolean;
privacySettingId: number;
lastSyncedAt: string | null;
}
export interface HardcoverAdminSettings {
featureEnabled: boolean;
}
export interface UpsertHardcoverSettingsPayload {
apiToken?: string;
enabled?: boolean;
autoSyncOnStatusChange?: boolean;
autoSyncOnProgressUpdate?: boolean;
autoSyncOnRatingChange?: boolean;
privacySettingId?: number;
}
export interface HardcoverTokenValidationResult {
valid: boolean;
hardcoverUsername?: string;
}
export type HardcoverSyncRunStatus = "running" | "completed" | "failed" | "cancelled";
export interface HardcoverSyncPendingSummary {
totalBooks: number;
pendingBooks: number;
}
export interface HardcoverActiveSyncStatus {
runId: number;
syncedBooks: number;
totalBooks: number;
status: HardcoverSyncRunStatus;
}
export type HardcoverPrivacySetting = 1 | 2 | 3;
+1
View File
@@ -38,3 +38,4 @@ export * from "./dictionary";
export * from "./achievement";
export * from "./reading-session";
export * from "./annotation";
export * from "./hardcover";