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 GetQAppSessionMetadata} — `instanceId` is injected from the bound Q App.
8 */
9export interface GetQAppSessionMetadataRequest extends Omit<
10 qapps.GetQAppSessionMetadataInput,
11 "instanceId" | "appId"
12> {}
13
14/**
15 * Runtime binding for `qapps:GetQAppSessionMetadata`.
16 *
17 * Retrieves a Q App session's metadata — name, sharing configuration, and ownership. Provide the implementation with
18 * `Effect.provide(AWS.QApps.GetQAppSessionMetadataHttp)`.
19 * ### Sessions
20 * **Example:** Read Session Sharing Configuration
21 * ```typescript
22 * // init — bind the operation to the Q App
23 * const getQAppSessionMetadata = yield* AWS.QApps.GetQAppSessionMetadata(app);
24 *
25 * // runtime
26 * const metadata = yield* getQAppSessionMetadata({ sessionId });
27 * console.log(metadata.sharingConfiguration.enabled);
28 * ```
29 *
30 * @binding
31 */
32export interface GetQAppSessionMetadata extends Binding.Service<
33 GetQAppSessionMetadata,
34 "AWS.QApps.GetQAppSessionMetadata",
35 (
36 app: QApp,
37 ) => Effect.Effect<
38 (
39 request: GetQAppSessionMetadataRequest,
40 ) => Effect.Effect<
41 qapps.GetQAppSessionMetadataOutput,
42 qapps.GetQAppSessionMetadataError
43 >
44 >
45> {}
46
47export const GetQAppSessionMetadata = Binding.Service<GetQAppSessionMetadata>(
48 "AWS.QApps.GetQAppSessionMetadata",
49);