UNPKG

ravendb

Version:
45 lines 1.31 kB
import { RavenCommand } from "../../../Http/RavenCommand.js"; import { RaftIdGenerator } from "../../../Utility/RaftIdGenerator.js"; export class DeleteOngoingTaskOperation { _taskId; _taskType; constructor(taskId, taskType) { this._taskId = taskId; this._taskType = taskType; } get resultType() { return "CommandResult"; } getCommand(conventions) { return new DeleteOngoingTaskCommand(this._taskId, this._taskType); } } class DeleteOngoingTaskCommand extends RavenCommand { _taskId; _taskType; constructor(taskId, taskType) { super(); this._taskId = taskId; this._taskType = taskType; } createRequest(node) { const uri = node.url + "/databases/" + node.database + "/admin/tasks?id=" + this._taskId + "&type=" + this._taskType; return { uri, method: "DELETE" }; } async setResponseAsync(bodyStream, fromCache) { if (!bodyStream) { this._throwInvalidResponse(); } return this._parseResponseDefaultAsync(bodyStream); } get isReadRequest() { return false; } getRaftUniqueRequestId() { return RaftIdGenerator.newId(); } } //# sourceMappingURL=DeleteOngoingTaskOperation.js.map