@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.
36 lines • 1.47 kB
JavaScript
import API from '../../APICore.js';
import Resource from '../Resource.js';
export default class IPXInterface extends Resource {
static baseUrl = `/rest/organizations/${API.orgPlaceholder}/ipxinterface/v1/interfaces`;
list(options) {
return this.api.get(this.buildPath(IPXInterface.baseUrl, options));
}
create(ipxInterfaceConfig) {
return this.api.post(IPXInterface.baseUrl, ipxInterfaceConfig);
}
delete(ipxInterfaceId) {
return this.api.delete(`${IPXInterface.baseUrl}/${ipxInterfaceId}`);
}
get(ipxInterfaceId) {
return this.api.get(`${IPXInterface.baseUrl}/${ipxInterfaceId}`);
}
update(ipxInterfaceId, ipxInterfaceConfig) {
return this.api.put(`${IPXInterface.baseUrl}/${ipxInterfaceId}`, ipxInterfaceConfig);
}
getLoader(ipxInterfaceId) {
return this.api.get(`${IPXInterface.baseUrl}/${ipxInterfaceId}/loader`);
}
generatePreview(ipxId, ipxInterfaceConfig) {
return this.api.post(`${IPXInterface.baseUrl}/${ipxId}/preview`, ipxInterfaceConfig);
}
getEditInterface(ipxInterfaceId) {
return this.api.get(`${IPXInterface.baseUrl}/${ipxInterfaceId}/edit`);
}
getLoginPage(ipxInterfaceId) {
return this.api.get(`${IPXInterface.baseUrl}/${ipxInterfaceId}/login`);
}
getToken(ipxInterfaceId) {
return this.api.get(`${IPXInterface.baseUrl}/${ipxInterfaceId}/token`);
}
}
//# sourceMappingURL=IPXInterface.js.map