File size: 370 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import wpcom from 'calypso/lib/wp';

export interface SiteScan {
	most_recent: {
		timestamp: string;
	};
	reason: string;
	state: 'unavailable' | 'idle';
	threats: Record< string, unknown >[];
}

export async function fetchSiteScan( siteId: number ): Promise< SiteScan > {
	return wpcom.req.get( {
		path: `/sites/${ siteId }/scan`,
		apiNamespace: 'wpcom/v2',
	} );
}