UNPKG

typesense

Version:
32 lines 1.41 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var Collections_1 = tslib_1.__importDefault(require("./Collections")); var Overrides_1 = tslib_1.__importDefault(require("./Overrides")); var Override = /** @class */ (function () { function Override(collectionName, overrideId, apiCall) { this.collectionName = collectionName; this.overrideId = overrideId; this.apiCall = apiCall; } Override.prototype.retrieve = function () { return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; Override.prototype.delete = function () { return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; }); }); }; Override.prototype.endpointPath = function () { return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.collectionName)).concat(Overrides_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.overrideId)); }; return Override; }()); exports.default = Override; //# sourceMappingURL=Override.js.map