UNPKG

ravendb

Version:
46 lines 1.57 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DeleteServerWideSorterOperation = void 0; const index_js_1 = require("../../../Exceptions/index.js"); const RavenCommand_js_1 = require("../../../Http/RavenCommand.js"); const RaftIdGenerator_js_1 = require("../../../Utility/RaftIdGenerator.js"); class DeleteServerWideSorterOperation { _sorterName; constructor(sorterName) { if (!sorterName) { (0, index_js_1.throwError)("InvalidArgumentException", "SorterName cannot be null"); } this._sorterName = sorterName; } get resultType() { return "CommandResult"; } getCommand(conventions) { return new DeleteServerWideSorterCommand(this._sorterName); } } exports.DeleteServerWideSorterOperation = DeleteServerWideSorterOperation; class DeleteServerWideSorterCommand extends RavenCommand_js_1.RavenCommand { _sorterName; constructor(sorterName) { super(); if (!sorterName) { (0, index_js_1.throwError)("InvalidArgumentException", "SorterName cannot be null"); } this._sorterName = sorterName; } createRequest(node) { const uri = node.url + "/admin/sorters?name=" + this._urlEncode(this._sorterName); return { uri, method: "DELETE" }; } get isReadRequest() { return false; } getRaftUniqueRequestId() { return RaftIdGenerator_js_1.RaftIdGenerator.newId(); } } //# sourceMappingURL=DeleteServerWideSorterOperation.js.map