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 * `GetMedia` request with `applicationId` injected from the bound application.
8 */
9export interface GetMediaRequest extends Omit<
10 qbusiness.GetMediaRequest,
11 "applicationId"
12> {}
13
14/**
15 * Runtime binding for the `GetMedia` operation (IAM action
16 * `qbusiness:GetMedia`), scoped to one {@link Application}.
17 *
18 * Fetches the media object (e.g. an extracted image) associated with
19 * a chat message.
20 * Provide the implementation with
21 * `Effect.provide(AWS.QBusiness.GetMediaHttp)`.
22 *
23 * ### Conversations
24 * **Example:** Fetch Message Media
25 * ```typescript
26 * const getMedia = yield* AWS.QBusiness.GetMedia(app);
27 *
28 * const media = yield* getMedia({ conversationId, messageId, mediaId });
29 * ```
30 *
31 * @binding
32 */
33export interface GetMedia extends Binding.Service<
34 GetMedia,
35 "AWS.QBusiness.GetMedia",
36 (
37 application: Application,
38 ) => Effect.Effect<
39 (
40 request: GetMediaRequest,
41 ) => Effect.Effect<qbusiness.GetMediaResponse, qbusiness.GetMediaError>
42 >
43> {}
44export const GetMedia = Binding.Service<GetMedia>("AWS.QBusiness.GetMedia");