File size: 556 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
27
28
import wpcom from 'calypso/lib/wp';

export type AtomicTransferStatus =
	| 'pending'
	| 'active'
	| 'provisioned'
	| 'completed'
	| 'error'
	| 'reverted'
	| 'relocating_revert'
	| 'relocating_switcheroo'
	| 'reverting'
	| 'renaming'
	| 'exporting'
	| 'importing'
	| 'cleanup';

export interface AtomicTransfer {
	status: AtomicTransferStatus;
}

export async function fetchLatestAtomicTransfer( siteId: number ): Promise< AtomicTransfer > {
	return wpcom.req.get( {
		path: `/sites/${ siteId }/atomic/transfers/latest`,
		apiNamespace: 'wpcom/v2',
	} );
}