/** * Copyright (c) 2026, Salesforce, Inc., * All rights reserved. * For full license text, see the LICENSE.txt file */ import type { GraphQLSchema } from "graphql"; import type { QuerySession } from "./session.js"; export type OutputMode = "human" | "json" | "quiet"; export interface CommandOpts { search?: string; regex?: string; long?: boolean; all?: boolean; as?: string; quiet?: boolean; dataCloud?: boolean; dryRun?: boolean; strict?: boolean; force?: boolean; mutation?: boolean; name?: string; out?: string; var?: string[]; json?: boolean; olderThan?: string; } export interface CommandContext { session: QuerySession; schema: GraphQLSchema; args: string[]; opts: CommandOpts; output: OutputMode; } export type CommandResult = Record; export interface CommandSubcommand { name: string; usage: string; description: string; } export interface CommandDef { name: string; aliases: string[]; summary: string; usage: string; examples: string[]; subcommands?: CommandSubcommand[]; mutates: boolean; requiresSession: boolean; category: "navigation" | "building" | "args" | "review" | "session" | "meta"; } export declare const COMMANDS: CommandDef[]; export declare const MUTATING_COMMANDS: Set; export declare function resolveCommand(name: string): CommandDef | undefined; export declare function getCommandNames(): string[]; export declare function getAllCommandNamesAndAliases(): string[]; export declare function setOutputMode(mode: OutputMode): void; export declare function getOutputMode(): OutputMode; export declare function setInteractiveMode(on: boolean): void; export declare function isInteractiveMode(): boolean;