UNPKG

ravendb

Version:
45 lines 1.49 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SetLogsConfigurationOperation = void 0; const index_js_1 = require("../../../Exceptions/index.js"); const RavenCommand_js_1 = require("../../../Http/RavenCommand.js"); class SetLogsConfigurationOperation { _parameters; constructor(parameters) { if (!parameters) { (0, index_js_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_js_1.RavenCommand { _parameters; constructor(parameters) { super(); if (!parameters) { (0, index_js_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