UNPKG

ravendb

Version:
48 lines 1.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AddQueueSinkOperation = void 0; const RavenCommand_js_1 = require("../../../Http/RavenCommand.js"); const RaftIdGenerator_js_1 = require("../../../Utility/RaftIdGenerator.js"); class AddQueueSinkOperation { _configuration; constructor(configuration) { this._configuration = configuration; } get resultType() { return "CommandResult"; } getCommand(conventions) { return new AddQueueSinkCommand(conventions, this._configuration); } } exports.AddQueueSinkOperation = AddQueueSinkOperation; class AddQueueSinkCommand extends RavenCommand_js_1.RavenCommand { _configuration; _conventions; constructor(conventions, configuration) { super(); this._conventions = conventions; this._configuration = configuration; } get isReadRequest() { return false; } createRequest(node) { const uri = node.url + "/databases/" + node.database + "/admin/queue-sink"; const headers = this._headers().typeAppJson().build(); const body = this._serializer.serialize(this._configuration); return { method: "PUT", uri, body, headers }; } async setResponseAsync(bodyStream, fromCache) { return this._parseResponseDefaultAsync(bodyStream); } getRaftUniqueRequestId() { return RaftIdGenerator_js_1.RaftIdGenerator.newId(); } } //# sourceMappingURL=AddQueueSinkOperation.js.map