UNPKG

ravendb

Version:
37 lines 1.05 kB
import { RavenCommand } from "../../Http/RavenCommand.js"; export class GetSubscriptionsCommand extends RavenCommand { _start; _pageSize; constructor(start, pageSize) { super(); this._start = start; this._pageSize = pageSize; } createRequest(node) { const uri = node.url + "/databases/" + node.database + "/subscriptions?start=" + this._start + "&pageSize=" + this._pageSize; return { uri }; } async setResponseAsync(bodyStream, fromCache) { if (!bodyStream) { this.result = null; return; } let body = null; const data = await this._defaultPipeline(_ => body = _) .process(bodyStream); const results = data["results"]; if (!results) { this._throwInvalidResponse(); return; } this.result = results; return body; } get isReadRequest() { return true; } } //# sourceMappingURL=GetSubscriptionsCommand.js.map