@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.
40 lines • 1.71 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const APICore_js_1 = tslib_1.__importDefault(require("../../APICore.js"));
const Resource_js_1 = tslib_1.__importDefault(require("../Resource.js"));
class IPXInterface extends Resource_js_1.default {
static baseUrl = `/rest/organizations/${APICore_js_1.default.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`);
}
}
exports.default = IPXInterface;
//# sourceMappingURL=IPXInterface.js.map