The best way to control Claude Code, Codex and more from any computer or phone

main
ts 49 lines 1.49 KB
Raw
1 import type * as qbusiness from "@distilled.cloud/aws/qbusiness";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Application } from "./Application.ts";
5
6 /**
7 * `PutFeedback` request with `applicationId` injected from the bound application.
8 */
9 export interface PutFeedbackRequest extends Omit<qbusiness.PutFeedbackRequest, "applicationId"> {}
10
11 /**
12 * Runtime binding for the `PutFeedback` operation (IAM action
13 * `qbusiness:PutFeedback`), scoped to one {@link Application}.
14 *
15 * Records end-user usefulness feedback (thumbs up/down and reasons)
16 * for a chat message, which Amazon Q Business uses to improve
17 * response quality.
18 * Provide the implementation with
19 * `Effect.provide(AWS.QBusiness.PutFeedbackHttp)`.
20 *
21 * ### Chat
22 * **Example:** Submit Feedback for a Message
23 * ```typescript
24 * const feedback = yield* AWS.QBusiness.PutFeedback(app);
25 *
26 * yield* feedback({
27 * conversationId: reply.conversationId!,
28 * messageId: reply.systemMessageId!,
29 * messageUsefulness: {
30 * usefulness: "USEFUL",
31 * submittedAt: new Date(),
32 * },
33 * });
34 * ```
35 *
36 * @binding
37 */
38 export interface PutFeedback extends Binding.Service<
39 PutFeedback,
40 "AWS.QBusiness.PutFeedback",
41 (
42 application: Application,
43 ) => Effect.Effect<
44 (
45 request: PutFeedbackRequest,
46 ) => Effect.Effect<qbusiness.PutFeedbackResponse, qbusiness.PutFeedbackError>
47 >
48 > {}
49 export const PutFeedback = Binding.Service<PutFeedback>("AWS.QBusiness.PutFeedback");