1import type * as qapps from "@distilled.cloud/aws/qapps";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { QApp } from "./QApp.ts";
5
6/**
7 * Request for {@link PredictQApp} — `instanceId` is injected from the bound Q App.
8 */
9export interface PredictQAppRequest extends Omit<
10 qapps.PredictQAppInput,
11 "instanceId"
12> {}
13
14/**
15 * Runtime binding for `qapps:PredictQApp`.
16 *
17 * Generates a Q App definition from a natural-language problem statement or a Q Business conversation. Provide the implementation with
18 * `Effect.provide(AWS.QApps.PredictQAppHttp)`.
19 * ### Generation
20 * **Example:** Generate an App Definition from a Prompt
21 * ```typescript
22 * // init — bind the operation to the Q App
23 * const predictQApp = yield* AWS.QApps.PredictQApp(app);
24 *
25 * // runtime
26 * const predicted = yield* predictQApp({
27 * options: {
28 * problemStatement: "Summarize meeting notes into action items",
29 * },
30 * });
31 * console.log(predicted.app.title);
32 * ```
33 *
34 * @binding
35 */
36export interface PredictQApp extends Binding.Service<
37 PredictQApp,
38 "AWS.QApps.PredictQApp",
39 (
40 app: QApp,
41 ) => Effect.Effect<
42 (
43 request?: PredictQAppRequest,
44 ) => Effect.Effect<qapps.PredictQAppOutput, qapps.PredictQAppError>
45 >
46> {}
47
48export const PredictQApp = Binding.Service<PredictQApp>(
49 "AWS.QApps.PredictQApp",
50);