UNPKG

@configurator/ravendb

Version:
43 lines 1.45 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SetLogsConfigurationOperation = void 0; const Exceptions_1 = require("../../../Exceptions"); const RavenCommand_1 = require("../../../Http/RavenCommand"); class SetLogsConfigurationOperation { constructor(parameters) { if (!parameters) { (0, Exceptions_1.throwError)("InvalidArgumentException", "Parameters cannot be null"); } this._parameters = parameters; } get resultType() { return "CommandResult"; } getCommand(conventions) { return new SetLogsConfigurationCommand(this._parameters); } } exports.SetLogsConfigurationOperation = SetLogsConfigurationOperation; class SetLogsConfigurationCommand extends RavenCommand_1.RavenCommand { constructor(parameters) { super(); if (!parameters) { (0, Exceptions_1.throwError)("InvalidArgumentException", "Parameters cannot be null"); } this._parameters = parameters; } get isReadRequest() { return false; } createRequest(node) { const uri = node.url + "/admin/logs/configuration"; const body = this._serializer.serialize(this._parameters); return { uri, method: "POST", headers: this._headers().typeAppJson().build(), body }; } } //# sourceMappingURL=SetLogsConfigurationOperation.js.map