UNPKG

ravendb

Version:
48 lines 1.5 kB
import { RavenCommand } from "../../../Http/RavenCommand.js"; import { RaftIdGenerator } from "../../../Utility/RaftIdGenerator.js"; export class UpdateQueueSinkOperation { _taskId; _configuration; constructor(taskId, configuration) { this._taskId = taskId; this._configuration = configuration; } getCommand(conventions) { return new UpdateQueueSinkCommand(conventions, this._taskId, this._configuration); } get resultType() { return "CommandResult"; } } class UpdateQueueSinkCommand extends RavenCommand { _taskId; _configuration; _conventions; constructor(conventions, taskId, configuration) { super(); this._taskId = taskId; this._configuration = configuration; this._conventions = conventions; } get isReadRequest() { return false; } createRequest(node) { const uri = node.url + "/databases/" + node.database + "/admin/queue-sink?id=" + this._taskId; 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=UpdateQueueSinkOperation.js.map