UNPKG

weaviate-client

Version:
36 lines (35 loc) • 909 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const commandBase_js_1 = require("../validation/commandBase.js"); class NodesStatusGetter extends commandBase_js_1.CommandBase { className; output; constructor(client) { super(client); } withClassName = (className) => { this.className = className; return this; }; withOutput = (output) => { this.output = output; return this; }; validate() { // nothing to validate } do = () => { let path = '/nodes'; if (this.className) { path = `${path}/${this.className}`; } if (this.output) { path = `${path}?output=${this.output}`; } else { path = `${path}?output=verbose`; } return this.client.get(path); }; } exports.default = NodesStatusGetter;