import { ContextNames } from "./Context.js"; import { Config } from "@oclif/core"; import { CommandType, ContextArgs, ContextFlags } from "./FlagSetBuilder.js"; import { MittwaldAPIV2Client } from "@mittwald/api-client"; /** * FlagSet defines a standardized set of flags and arguments for a specific * context. It is used to define a reusable set of flags and arguments that can * be used in multiple commands. * * Typically, a FlagSet is created using the `makeFlagSet` function (or a * derivative of it). */ interface FlagSet { name: TName; flags: ContextFlags; args: ContextArgs; withId: (apiClient: MittwaldAPIV2Client, command: CommandType | "flag" | "arg", flags: { [k: string]: unknown; }, args: { [k: string]: unknown; }, cfg: Config) => Promise; } export default FlagSet;