| 1 |
import apiFetch from '@wordpress/api-fetch'; |
| 2 |
|
| 3 |
export const prefetchAssistData = async () => |
| 4 |
await apiFetch({ path: 'extendify/v1/auto-launch/prefetch-assist-data' }); |
| 5 |
|
| 6 |
export const postLaunchFunctions = () => |
| 7 |
apiFetch({ |
| 8 |
path: '/extendify/v1/auto-launch/post-launch-functions', |
| 9 |
method: 'POST', |
| 10 |
}); |
| 11 |
|
| 12 |
export const preLaunchFunctions = () => |
| 13 |
apiFetch({ |
| 14 |
path: '/extendify/v1/auto-launch/pre-launch-functions', |
| 15 |
method: 'POST', |
| 16 |
}); |
| 17 |
|
| 18 |
export const runUpdates = () => |
| 19 |
apiFetch({ |
| 20 |
path: '/extendify/v1/auto-launch/run-updates', |
| 21 |
method: 'POST', |
| 22 |
}); |
| 23 |
|
| 24 |
export const forceReinstallPlugin = (slug) => |
| 25 |
apiFetch({ |
| 26 |
path: '/wp/v2/plugins', |
| 27 |
method: 'POST', |
| 28 |
headers: { 'X-Extendify-Force-Reinstall': '1' }, |
| 29 |
data: { slug }, |
| 30 |
}); |
| 31 |
|