UNPKG

ravendb

Version:
44 lines 1.35 kB
import { RavenCommand } from "../../../Http/RavenCommand.js"; import { RaftIdGenerator } from "../../../Utility/RaftIdGenerator.js"; export class AddQueueSinkOperation { _configuration; constructor(configuration) { this._configuration = configuration; } get resultType() { return "CommandResult"; } getCommand(conventions) { return new AddQueueSinkCommand(conventions, this._configuration); } } class AddQueueSinkCommand extends 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.newId(); } } //# sourceMappingURL=AddQueueSinkOperation.js.map