UNPKG

@configurator/ravendb

Version:
44 lines 1.51 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DeleteServerWideSorterOperation = void 0; const Exceptions_1 = require("../../../Exceptions"); const RavenCommand_1 = require("../../../Http/RavenCommand"); const RaftIdGenerator_1 = require("../../../Utility/RaftIdGenerator"); class DeleteServerWideSorterOperation { constructor(sorterName) { if (!sorterName) { (0, Exceptions_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_1.RavenCommand { constructor(sorterName) { super(); if (!sorterName) { (0, Exceptions_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_1.RaftIdGenerator.newId(); } } //# sourceMappingURL=DeleteServerWideSorterOperation.js.map