UNPKG

@configurator/ravendb

Version:
40 lines 1.29 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetOperationStateCommand = exports.GetOperationStateOperation = void 0; const RavenCommand_1 = require("../../Http/RavenCommand"); class GetOperationStateOperation { constructor(id, nodeTag) { this._id = id; this._nodeTag = nodeTag; } getCommand(conventions) { return new GetOperationStateCommand(this._id, this._nodeTag); } get resultType() { return "CommandResult"; } } exports.GetOperationStateOperation = GetOperationStateOperation; class GetOperationStateCommand extends RavenCommand_1.RavenCommand { get isReadRequest() { return true; } constructor(id, nodeTag) { super(); this._id = id; this._selectedNodeTag = nodeTag; this.timeout = 15000; } createRequest(node) { const uri = `${node.url}/databases/${node.database}/operations/state?id=${this._id}`; return { uri }; } async setResponseAsync(bodyStream, fromCache) { if (!bodyStream) { return; } return this._parseResponseDefaultAsync(bodyStream); } } exports.GetOperationStateCommand = GetOperationStateCommand; //# sourceMappingURL=GetOperationStateOperation.js.map