UNPKG

@coveo/platform-client

Version:

The main goal of this package is to provide an easy to configure and straightforward way of querying Coveo Cloud APIs using JavaScript.

24 lines 875 B
import Resource from '../Resource.js'; import API from '../../APICore.js'; export default class License extends Resource { static baseUrl = `/rest/organizations/${API.orgPlaceholder}/license`; get(sectionName) { return this.api.get(sectionName ? `${License.baseUrl}/${sectionName}` : License.baseUrl); } full() { return this.api.get(License.baseUrl); } update(sectionName, licenseSection) { return this.api.put(`${License.baseUrl}/${sectionName}`, licenseSection); } updateLicense(license) { return this.api.put(License.baseUrl, license); } updateExpirationDate(options) { return this.api.put(this.buildPath(`${License.baseUrl}/expiration`, options)); } getPossibleSourceTypes() { return this.api.get(`${License.baseUrl}/sourcetypes`); } } //# sourceMappingURL=License.js.map