import { EResult, OperationResponse } from "./shared"; export interface GameNotes { /** * @returns a boolean indicating whether the operation was successful. */ DeleteImage(param0: string): Promise; /** * @returns a boolean indicating whether the operation was successful. */ DeleteNotes(param0: string): Promise; GetNotes(filenameForNotes: string, directoryForNoteImages: string): Promise; GetNotesMetadata(note: string): Promise; GetNumNotes(): Promise; GetQuota: Promise; IterateNotes(appId: number, length: number): Promise; ResolveSyncConflicts(param0: boolean): Promise; /** * @param notes Escaped JSON array of {@link Note}. */ SaveNotes(filenameForNotes: string, notes: string): Promise; SyncToClient(): Promise; SyncToServer(): Promise; /** * @param mimeType Image MIME type. * @param base64 Image contents in base64. * @returns an image file name with its extension that's meant to be used as a part of some URL. (todo) * @throws OperationResponse if invalid MIME type or unable to parse base64 BUT NOT if it failed. */ UploadImage(imageFileNamePrefix: string, mimeType: string, base64: string): Promise; } export interface Note { appid: number; id: string; /** * Note contents in BB code. */ content: string; ordinal: number; time_created: number; time_modified: number; title: string; } interface Notes { result: EResult; /** * Escaped JSON array of {@link Note}. Not present if {@link result} is {@link EResult.FileNotFound}. */ notes?: string; } interface NoteMetadata { filename: string; filesize: number; result: EResult; timestamp: number; } interface NotesQuota { bytes: number; bytesAvailable: number; numFiles: number; numFilesAvailable: number; }