2022-01-24 15:32:27 +01:00
|
|
|
export const buildOtherEndpoints = API => ({
|
|
|
|
/**
|
|
|
|
* TODO: find out what this is
|
|
|
|
*/
|
|
|
|
checkImportComplete: async () => {
|
|
|
|
return await API.get({
|
|
|
|
url: "/api/cloud/import/complete",
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the current environment details.
|
|
|
|
*/
|
|
|
|
getEnvironment: async () => {
|
|
|
|
return await API.get({
|
|
|
|
url: "/api/system/environment",
|
|
|
|
})
|
|
|
|
},
|
2022-01-24 17:38:36 +01:00
|
|
|
|
2022-02-24 15:41:24 +01:00
|
|
|
/**
|
|
|
|
* Gets the current system status.
|
|
|
|
*/
|
|
|
|
getSystemStatus: async () => {
|
|
|
|
return await API.get({
|
|
|
|
url: "/api/system/status",
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2022-01-24 17:38:36 +01:00
|
|
|
/**
|
|
|
|
* Gets the list of available integrations.
|
|
|
|
*/
|
|
|
|
getIntegrations: async () => {
|
|
|
|
return await API.get({
|
|
|
|
url: "/api/integrations",
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the version of the installed Budibase environment.
|
|
|
|
*/
|
|
|
|
getBudibaseVersion: async () => {
|
2022-02-22 10:10:41 +01:00
|
|
|
return (
|
|
|
|
await API.get({
|
|
|
|
url: "/api/dev/version",
|
|
|
|
})
|
|
|
|
).version
|
2022-01-24 17:38:36 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the base permissions for roles.
|
|
|
|
*/
|
|
|
|
getBasePermissions: async () => {
|
|
|
|
return await API.get({
|
|
|
|
url: "/api/permission/builtin",
|
|
|
|
})
|
|
|
|
},
|
2022-01-24 15:32:27 +01:00
|
|
|
})
|