mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
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:
@@ -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;
|
||||
@@ -38,3 +38,4 @@ export * from "./dictionary";
|
||||
export * from "./achievement";
|
||||
export * from "./reading-session";
|
||||
export * from "./annotation";
|
||||
export * from "./hardcover";
|
||||
|
||||
Reference in New Issue
Block a user