UNPKG

ravendb

Version:
41 lines 1.25 kB
import { throwError } from "../../../Exceptions/index.js"; import { RavenCommand } from "../../../Http/RavenCommand.js"; export class SetLogsConfigurationOperation { _parameters; constructor(parameters) { if (!parameters) { throwError("InvalidArgumentException", "Parameters cannot be null"); } this._parameters = parameters; } get resultType() { return "CommandResult"; } getCommand(conventions) { return new SetLogsConfigurationCommand(this._parameters); } } class SetLogsConfigurationCommand extends RavenCommand { _parameters; constructor(parameters) { super(); if (!parameters) { 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