File size: 462 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import wpcom from 'calypso/lib/wp';

export interface LaunchpadTask {
	completed: boolean;
}

export interface Launchpad {
	checklist?: LaunchpadTask[] | null;
}

export async function fetchSiteLaunchpad(
	siteId: number,
	checklistSlug: string
): Promise< Launchpad > {
	return wpcom.req.get(
		{
			path: `/sites/${ siteId }/launchpad`,
			apiNamespace: 'wpcom/v2',
		},
		{
			checklist_slug: checklistSlug,
			launchpad_context: 'sites-dashboard',
		}
	);
}