Interface SyncManagerPropsInternal

Props for the SyncManager component.

export interface SyncManagerProps {
entries: AniListMediaEntry[];
token: string;
onComplete?: (report: SyncReport) => void;
onCancel?: () => void;
autoStart?: boolean;
syncState?: {
isActive: boolean;
progress: SyncProgress | null;
report: SyncReport | null;
error: string | null;
};
syncActions?: {
startSync: (
entries: AniListMediaEntry[],
token: string,
_?: undefined,
displayOrderMediaIds?: number[],
) => Promise<void>;
cancelSync: () => void;
};
incrementalSync?: boolean;
onIncrementalSyncChange?: (value: boolean) => void;
displayOrderMediaIds?: number[];
}
interface SyncManagerProps {
    entries: AniListMediaEntry[];
    token: string;
    onComplete?: (report: SyncReport) => void;
    onCancel?: () => void;
    autoStart?: boolean;
    syncState?: {
        isActive: boolean;
        progress: null | SyncProgress;
        report: null | SyncReport;
        error: null | string;
    };
    syncActions?: {
        startSync: (
            entries: AniListMediaEntry[],
            token: string,
            _?: undefined,
            displayOrderMediaIds?: number[],
        ) => Promise<void>;
        cancelSync: () => void;
    };
    incrementalSync?: boolean;
    onIncrementalSyncChange?: (value: boolean) => void;
    displayOrderMediaIds?: number[];
}

Properties

The list of AniList media entries to synchronize.

token: string

The AniList authentication token.

onComplete?: (report: SyncReport) => void

Optional callback invoked when synchronization completes, with the sync report.

onCancel?: () => void

Optional callback invoked when synchronization is cancelled.

autoStart?: boolean

Whether to automatically start synchronization on mount (default: true).

syncState?: {
    isActive: boolean;
    progress: null | SyncProgress;
    report: null | SyncReport;
    error: null | string;
}

Optional sync state object containing progress, report, and error information.

syncActions?: {
    startSync: (
        entries: AniListMediaEntry[],
        token: string,
        _?: undefined,
        displayOrderMediaIds?: number[],
    ) => Promise<void>;
    cancelSync: () => void;
}

Optional sync actions for starting and cancelling sync.

incrementalSync?: boolean

Whether to use incremental sync mode.

onIncrementalSyncChange?: (value: boolean) => void

Callback for toggling incremental sync mode.

displayOrderMediaIds?: number[]

Optional array of media IDs to control display order.