import { IconName } from '@blueprintjs/core' ; /**
 * Preview provider static interface.
 */ export interface PreviewProvider { getProviderId ( ) : string ; parse ( message ) : Previews ; resolve ( preview ) : Promise < Preview > ; } /**
 * Preview parsing results.
 */ export type Previews = Record < string , UnresolvedPreview | Preview > ; /**
 * Unresolved preview.
 */ export type UnresolvedPreview = { id : string ; provider : string ; resolved : boolean ; type ? : string | number ; extra ? : Record < string , string | number > ; } ; /**
 * Resolved preview.
 */ export type Preview = UnresolvedPreview & { icon ? : IconName ; image ? : string ; meta : string ; title : string ; url ? : string ; } ; param preview return export function isResolved ( preview ) { return preview . resolved === true ; }