UNPKG

ravendb

Version:
43 lines 1.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetServerWideOperationStateCommand = exports.GetServerWideOperationStateOperation = void 0; const RavenCommand_js_1 = require("../../Http/RavenCommand.js"); class GetServerWideOperationStateOperation { get resultType() { return "CommandResult"; } _id; constructor(id) { this._id = id; } getCommand(conventions) { return new GetServerWideOperationStateCommand(this._id); } } exports.GetServerWideOperationStateOperation = GetServerWideOperationStateOperation; class GetServerWideOperationStateCommand extends RavenCommand_js_1.RavenCommand { _id; constructor(id, nodeTag) { super(); this._id = id; this._selectedNodeTag = nodeTag; } createRequest(node) { const uri = node.url + "/operations/state?id=" + this._id; return { uri, method: "GET" }; } get isReadRequest() { return true; } async setResponseAsync(bodyStream, fromCache) { if (!bodyStream) { this._throwInvalidResponse(); } return this._parseResponseDefaultAsync(bodyStream); } } exports.GetServerWideOperationStateCommand = GetServerWideOperationStateCommand; //# sourceMappingURL=GetServerWideOperationStateOperation.js.map