import { AlphabetLowercase, Arg, OptionFlag } from "@oclif/core/interfaces"; import { MittwaldAPIV2Client } from "@mittwald/api-client"; import Context, { ContextKey, ContextNames } from "./Context.js"; import FlagSet from "./FlagSet.js"; export type ContextFlags> = { [k in TID]: OptionFlag; }; export type ContextArgs> = { [k in TID]: Arg; }; export type CommandType> = { flags: { [k in TID]: OptionFlag; }; } | { args: { [k in TID]: Arg; }; }; export declare class MissingFlagError extends Error { constructor(name: string, flagName: string); } export declare class MissingArgError extends Error { constructor(name: string, flagName: string); } export type FlagSetOptions = { normalize: NormalizeFn; displayName: string; retrieveFromContext: boolean; expectedShortIDFormat: { pattern: RegExp; display: string; }; }; export type NormalizeFn = (apiClient: MittwaldAPIV2Client, id: string, ctx: Context) => string | Promise; export declare function makeMissingContextInputError(commandType: { flags: { [k in ContextKey]: OptionFlag; }; } | { args: { [k in ContextKey]: Arg; }; } | "flag" | "arg", name: TName, flagName: `${TName}-id`, contextSupport?: boolean): Error; export default class FlagSetBuilder { private readonly name; private readonly char; private readonly opts; private readonly flagName; constructor(name: TName, char: AlphabetLowercase, opts?: Partial); private get displayName(); private buildIDFromArgsOrFlag; private buildFlags; private buildArgs; private buildSanityCheck; private buildIDGetter; build(): FlagSet; } /** * Helper function for building a FlagSet. * * @deprecated Use FlagSetBuilder directly instead. */ export declare function makeFlagSet(name: TName, char: AlphabetLowercase, opts?: Partial): FlagSet;