UNPKG

hcc-imageright-apis

Version:

imageright APIs

37 lines (36 loc) 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getConcurrentLoginData = getConcurrentLoginData; exports.getMessages = getMessages; exports.login = login; exports.logout = logout; exports.stillAlive = stillAlive; exports.validateLicense = validateLicense; function getConcurrentLoginData(api, featureName) { return api .get(`api/licensing/${featureName}/currentlogindata`) .then((res) => Promise.resolve(res.data)); } function getMessages(api, referenceKey) { return api.get(`api/licensing/${referenceKey}`).then((res) => Promise.resolve(res.data)); } function login(api, programId, featureName) { return api .post(`api/licensing/${programId}/${featureName}/login`) .then((res) => Promise.resolve(res.data)); } function logout(api, loginId, featureName) { return api .post(`api/licensing/${loginId}/${featureName}/logout`) .then((res) => Promise.resolve(res.data)); } function stillAlive(api, referenceKey, programId, featureName) { return api .post(`api/licensing/${referenceKey}/${programId}/${featureName}/stillalive`) .then((res) => Promise.resolve(res.data)); } function validateLicense(api, feature) { return api .get(`api/licensing/ValidateLicese/${feature}`) .then((res) => Promise.resolve(res.data)); }