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

main
ts 46 lines 1.43 KB
Raw
1 import type * as qapps from "@distilled.cloud/aws/qapps";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { QApp } from "./QApp.ts";
5
6 /**
7 * Request for {@link DescribeQAppPermissions} — `instanceId` and `appId` are injected from the bound Q App.
8 */
9 export interface DescribeQAppPermissionsRequest extends Omit<
10 qapps.DescribeQAppPermissionsInput,
11 "instanceId" | "appId"
12 > {}
13
14 /**
15 * Runtime binding for `qapps:DescribeQAppPermissions`.
16 *
17 * Reads the principals and actions granted on the bound Q App. Provide the implementation with
18 * `Effect.provide(AWS.QApps.DescribeQAppPermissionsHttp)`.
19 * ### Permissions
20 * **Example:** Describe App Permissions
21 * ```typescript
22 * // init — bind the operation to the Q App
23 * const describeQAppPermissions = yield* AWS.QApps.DescribeQAppPermissions(app);
24 *
25 * // runtime
26 * const permissions = yield* describeQAppPermissions();
27 * console.log(permissions.permissions?.length);
28 * ```
29 *
30 * @binding
31 */
32 export interface DescribeQAppPermissions extends Binding.Service<
33 DescribeQAppPermissions,
34 "AWS.QApps.DescribeQAppPermissions",
35 (
36 app: QApp,
37 ) => Effect.Effect<
38 (
39 request?: DescribeQAppPermissionsRequest,
40 ) => Effect.Effect<qapps.DescribeQAppPermissionsOutput, qapps.DescribeQAppPermissionsError>
41 >
42 > {}
43
44 export const DescribeQAppPermissions = Binding.Service<DescribeQAppPermissions>(
45 "AWS.QApps.DescribeQAppPermissions",
46 );