UNPKG

@rockset/cli

Version:
58 lines (54 loc) 2.27 kB
"use strict"; /* eslint-disable unicorn/filename-case */ // Generated file, please do not edit directly Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@oclif/core"); const core_2 = require("@rockset/core"); const util_1 = require("../../../helper/util"); const base_command_1 = require("../../../base-command"); const chalk = require("chalk"); const cli_ux_1 = require("cli-ux"); const bodySchema = ``; let GetView = /** @class */ (() => { class GetView extends base_command_1.RockCommand { async run() { const { args, flags } = await this.parse(GetView); // Rockset client object const client = await core_2.main.createClient(); const namedArgs = GetView.args; // apicall const apicall = client.views.getView.bind(client.views); // endpoint const endpoint = '/v1/orgs/self/ws/{workspace}/views/{view}'; const method = 'GET'; await util_1.runApiCall.bind(this)({ args, flags, namedArgs, apicall, method, endpoint, bodySchema }); } } GetView.flags = Object.assign({ help: core_1.Flags.help({ char: 'h' }), raw: core_1.Flags.boolean({ description: 'Show the raw output from the server, instead of grabbing the results. Usually used in conjunction with --output=json', }) }, cli_ux_1.cli.table.flags({ only: ['columns', 'output'] })); GetView.args = [ { name: 'workspace', description: 'name of the workspace', required: true, hidden: false, }, { name: 'view', description: 'name of the view', required: true, hidden: false, }, ]; GetView.description = `get details about a view Arguments to this command will be passed as URL parameters to ${chalk.bold(`GET: /v1/orgs/self/ws/{workspace}/views/{view}`)} Endpoint Reference GET: /v1/orgs/self/ws/{workspace}/views/{view} Retrieve View Get details about a view More documentation at ${chalk.underline(`https://docs.rockset.com/rest-api#getview`)}`; GetView.examples = ['$ rockset api:views:getView WORKSPACE VIEW']; return GetView; })(); exports.default = GetView;