// Copyright 2022 Gnuxie // Copyright 2022 The Matrix.org Foundation C.I.C. // // SPDX-License-Identifier: Apache-2.0 // // SPDX-FileAttributionText: // This modified file incorporates work from mjolnir // https://github.com/matrix-org/mjolnir // // SPDX-FileAttributionText: // This modified file incorporates work from @the-draupnir-project/interface-manager // https://github.com/the-draupnir-project/interface-manager // import { Result } from "@gnuxie/typescript-result"; import { PresentationSchema } from "./PresentationSchema"; import { PromptOptions } from "./PromptForAccept"; export type Prompt = ( context: Context ) => Promise>>; export interface ParameterDescription { name: string; description?: string | undefined; acceptor: PresentationSchema; /** * Prompt the interface for an argument that was not provided. * @param this Expected to be the executor context that is used to provided to the command executor. * @param description The parameter description being accepted. * @returns PromptOptions, to be handled by the interface adaptor. */ prompt?: Prompt | undefined; }