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