export type PostSuggestions = OldPostSuggestions | NewPostSuggestions; export interface OldPostSuggestion { /** auto increment */ id: number; /** Date iso string */ time: string; original_prefix: string; original_suffix: string; snapshot_prefix: string; snapshot_suffix: string; language: string | null; filename: string | null; } export interface OldPostSuggestions { suggestions: OldPostSuggestion[]; } export interface NewPostSuggestions { data: SuggestionDataItem[]; metadata: SuggestionMetadataItem[]; } export interface SuggestionDataItem { prefix: string; suffix: string; snapshot_prefix: string; snapshot_suffix: string; } export interface SuggestionMetadataItem { /** Client binary generated id */ id: number; /** Date iso string */ time: string; language: string | null; filename: string | null; line: number | null; character: number | null; offset: number | null; git_index_sha1: string | null; git_branch: string | null; git_repo: string | null; }