Download wp-calypso/client/dashboard/data/site-atomic-transfers.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 556 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/data/site-atomic-transfers.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/dashboard/data/site-atomic-transfers.ts
-
curl -L -o site-atomic-transfers.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/data/site-atomic-transfers.ts
556 Bytes
| 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', | |
| } ); | |
| } | |