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 * `ListMessages` request with `applicationId` injected from the bound application.
8 */
9export interface ListMessagesRequest extends Omit<
10 qbusiness.ListMessagesRequest,
11 "applicationId"
12> {}
13
14/**
15 * Runtime binding for the `ListMessages` operation (IAM action
16 * `qbusiness:ListMessages`), scoped to one {@link Application}.
17 *
18 * Lists the messages of a chat conversation.
19 * Provide the implementation with
20 * `Effect.provide(AWS.QBusiness.ListMessagesHttp)`.
21 *
22 * ### Conversations
23 * **Example:** List a Conversation's Messages
24 * ```typescript
25 * const listMessages = yield* AWS.QBusiness.ListMessages(app);
26 *
27 * const { messages } = yield* listMessages({ conversationId });
28 * ```
29 *
30 * @binding
31 */
32export interface ListMessages extends Binding.Service<
33 ListMessages,
34 "AWS.QBusiness.ListMessages",
35 (
36 application: Application,
37 ) => Effect.Effect<
38 (
39 request: ListMessagesRequest,
40 ) => Effect.Effect<
41 qbusiness.ListMessagesResponse,
42 qbusiness.ListMessagesError
43 >
44 >
45> {}
46export const ListMessages = Binding.Service<ListMessages>(
47 "AWS.QBusiness.ListMessages",
48);