UNPKG

@configurator/ravendb

Version:
31 lines 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetNextOperationIdCommand = void 0; const RavenCommand_1 = require("../../Http/RavenCommand"); class GetNextOperationIdCommand extends RavenCommand_1.RavenCommand { get nodeTag() { return this._nodeTag; } get isReadRequest() { return false; } createRequest(node) { const uri = `${node.url}/databases/${node.database}/operations/next-operation-id`; return { uri }; } async setResponseAsync(bodyStream, fromCache) { let body = null; const results = await this._defaultPipeline(_ => body = _).process(bodyStream); const id = results["id"]; if (typeof id !== "undefined") { this.result = id; } const nodeTag = results["nodeTag"]; if (nodeTag) { this._nodeTag = nodeTag; } return body; } } exports.GetNextOperationIdCommand = GetNextOperationIdCommand; //# sourceMappingURL=GetNextOperationIdCommand.js.map