1export interface MotionGolden { 2 id: string; 3 result: 'PASSED' | 'FAILED' | 'MISSING_REFERENCE'; 4 label: string; 5 goldenRepoPath: string; 6 updated: boolean; 7 testClassName: string; 8 testMethodName: string; 9 testTime: string; 10 11 actualUrl: string; 12 videoUrl: string | undefined; 13} 14 15export interface MotionGoldenData { 16 frame_ids: Array<string | number>; 17 features: MotionGoldenFeature[]; 18} 19 20export interface MotionGoldenFeature { 21 name: string; 22 type: string; 23 data_points: Array<DataPoint>; 24} 25 26type DataPointTypes = 27 | string 28 | number 29 | boolean 30 | null 31 | DataPointArray 32 | DataPointObject; 33export interface DataPointObject { 34 [member: string]: DataPointTypes; 35} 36export interface DataPointArray extends Array<DataPointTypes> {} 37export interface NotFound { 38 type: 'not_found'; 39} 40export type DataPoint = DataPointTypes | NotFound; 41 42export function isNotFound(dataPoint: DataPoint) { 43 return ( 44 dataPoint instanceof Object && 45 'type' in dataPoint && 46 dataPoint.type === 'not_found' 47 ); 48} 49