import { ContentId, IContentUserData, IContentUserDataStorage, IFinishedUserData, IUser } from '../../types'; /** * Saves user data in JSON files on the disk. It creates one file per content * object. There's a separate file for user states and one for the finished data. * Each file contains a list of all states or finished data objects. */ export default class FileContentUserDataStorage implements IContentUserDataStorage { protected directory: string; constructor(directory: string); getContentUserData(contentId: ContentId, dataType: string, subContentId: string, userId: string, contextId?: string): Promise; getContentUserDataByUser(user: IUser): Promise; createOrUpdateContentUserData(userData: IContentUserData): Promise; deleteInvalidatedContentUserData(contentId: string): Promise; deleteAllContentUserDataByUser(user: IUser): Promise; deleteAllContentUserDataByContentId(contentId: ContentId): Promise; getContentUserDataByContentIdAndUser(contentId: ContentId, userId: string, contextId?: string): Promise; createOrUpdateFinishedData(finishedData: IFinishedUserData): Promise; getFinishedDataByContentId(contentId: string): Promise; getFinishedDataByUser(user: IUser): Promise; deleteFinishedDataByContentId(contentId: string): Promise; deleteFinishedDataByUser(user: IUser): Promise; private getSafeUserDataFilePath; private getSafeFinishedFilePath; }