2022-03-09 22:16:22 +01:00
|
|
|
export const buildLicensingEndpoints = API => ({
|
|
|
|
/**
|
|
|
|
* Activates a self hosted license key
|
|
|
|
*/
|
|
|
|
activateLicenseKey: async data => {
|
|
|
|
return API.post({
|
|
|
|
url: `/api/global/license/activate`,
|
|
|
|
body: data,
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the license info - metadata about the license including the
|
|
|
|
* obfuscated license key.
|
|
|
|
*/
|
|
|
|
getLicenseInfo: async () => {
|
|
|
|
return API.get({
|
|
|
|
url: "/api/global/license/info",
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Refreshes the license cache
|
|
|
|
*/
|
|
|
|
refreshLicense: async () => {
|
|
|
|
return API.post({
|
|
|
|
url: "/api/global/license/refresh",
|
|
|
|
})
|
|
|
|
},
|
2022-05-16 19:13:59 +02:00
|
|
|
|
2022-05-17 18:44:40 +02:00
|
|
|
/**
|
|
|
|
* Retrieve the usage information for the tenant
|
|
|
|
*/
|
2022-05-16 19:13:59 +02:00
|
|
|
getQuotaUsage: async () => {
|
|
|
|
return API.get({
|
2022-05-17 18:44:40 +02:00
|
|
|
url: "/api/global/license/usage",
|
2022-05-16 19:13:59 +02:00
|
|
|
})
|
|
|
|
},
|
2022-03-09 22:16:22 +01:00
|
|
|
})
|