budibase/packages/frontend-core/src/api/other.js

59 lines
1.1 KiB
JavaScript
Raw Normal View History

export const buildOtherEndpoints = API => ({
/**
* Gets the current environment details.
*/
getEnvironment: async () => {
return await API.get({
url: "/api/system/environment",
})
},
/**
* Gets the current system status.
*/
getSystemStatus: async () => {
return await API.get({
url: "/api/system/status",
})
},
/**
* 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
},
/**
* Gets the base permissions for roles.
*/
getBasePermissions: async () => {
return await API.get({
url: "/api/permission/builtin",
})
},
/**
* Check if they are part of the budibase beta program.
*/
checkBetaAccess: async email => {
return await API.get({
2022-06-28 23:45:05 +02:00
url: `/api/beta/access?email=${email}`,
2022-06-28 20:26:59 +02:00
external: true,
})
},
})