import { Command } from '@oclif/core'; import { type ApiClient } from './client.js'; export declare abstract class BaseCommand extends Command { static baseFlags: { json: import("@oclif/core/interfaces").BooleanFlag; fields: import("@oclif/core/interfaces").OptionFlag; jq: import("@oclif/core/interfaces").OptionFlag; format: import("@oclif/core/interfaces").OptionFlag; 'api-key': import("@oclif/core/interfaces").OptionFlag; quiet: import("@oclif/core/interfaces").BooleanFlag; }; /** * `--organization` (alias `--tenant-org`) for commands that can act on a * sub-organization. Spread into a command's flags alongside {@link baseFlags}; * {@link requestScope} then applies it to SDK and REST calls alike, so declaring * it can never leave it silently ignored. * * Only spread it into a command whose request is actually scoped by it. A command * that cannot pass the organization on (because its endpoint ignores the header, * say) must leave it out: the flag also rejects an empty value, so an unused * `--organization "$UNSET_VAR"` would abort the command over a no-op. */ static tenantOrgFlag: { organization: import("@oclif/core/interfaces").OptionFlag; }; /** * `--limit` / `--offset` for list commands, declared once so the defaults and * wording cannot drift between them. `notes` appends an API-specific constraint — * the support-ticket API, for instance, caps the page size and rejects an offset * that is not page-aligned. */ static paginationFlags(notes?: { limit?: string; offset?: string; }): { limit: import("@oclif/core/interfaces").OptionFlag; offset: import("@oclif/core/interfaces").OptionFlag; }; private _parsedFlags?; private _api?; private _jsonMode?; private _scope?; /** * Status/info messages. Goes to stderr in JSON mode so stdout stays clean. * Goes to stdout in interactive mode so users see it normally. */ log(message?: string, ...args: unknown[]): void; protected catch(err: Error & { httpStatusCode?: number; errorCode?: number | string; developerMessage?: string; requestId?: string; tenantOrgId?: string; }): Promise; protected parseFlags(): Promise>; /** * The credential and organization scope for one invocation, derived from the * parsed flags in one place. * * Commands pass this straight to the REST helper instead of threading * `flags['api-key']` and the organization by hand — so a new credential-affecting * base flag (a `--profile`, say) is wired up here once rather than in every * command, and REST-backed commands cannot drift from SDK-backed ones. */ protected requestScope(): Promise<{ apiKey?: string; tenantOrgId?: string; }>; protected getApi(): Promise; protected isJsonMode(): Promise; /** Whether to render rich tables (TTY or --format table) */ private useTable; private writeJson; /** * Output structured data. In --json mode writes JSON to stdout. * Otherwise renders a key-value table for objects, columnar table for arrays. */ protected outputData(data: unknown): Promise; /** * Output a list of items. In --json mode writes full objects as JSON. * In table mode, only shows the specified columns. */ protected outputList(items: Record[], columns: string[]): Promise; } //# sourceMappingURL=base-command.d.ts.map