Hiyve Components - v1.0.0
    Preparing search index...

    Interface UseAssignmentPersistenceOptions

    Options for the useAssignmentPersistence hook.

    Configures auto-save behavior for assignments, including the save interval, file location, and callbacks for save lifecycle events.

    interface UseAssignmentPersistenceOptions {
        autoSaveInterval?: number;
        client: AssignmentFileClient | null;
        content: JSONContent;
        enabled?: boolean;
        fileId?: string;
        fileLocation?: string;
        metadata: AssignmentMetadataState;
        onError?: (error: Error) => void;
        onSaved?: (fileId: string) => void;
        title: string;
        userId: string;
        userName?: string;
    }
    Index

    Properties

    autoSaveInterval?: number

    Auto-save interval in milliseconds (default: 3000)

    client: AssignmentFileClient | null

    Hiyve client instance (must implement AssignmentFileClient)

    content: JSONContent

    Current content as JSON

    enabled?: boolean

    Whether persistence is enabled

    fileId?: string

    Existing file ID to update

    fileLocation?: string

    File storage location (default: '/Assignments')

    Assignment metadata state

    onError?: (error: Error) => void

    Callback on save error

    onSaved?: (fileId: string) => void

    Callback after successful save

    title: string

    Assignment title

    userId: string

    Current user ID

    userName?: string

    Current user display name