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 UpdateLibraryItem} — `instanceId` is injected from the bound Q App.
8 */
9export interface UpdateLibraryItemRequest extends Omit<
10 qapps.UpdateLibraryItemInput,
11 "instanceId"
12> {}
13
14/**
15 * Runtime binding for `qapps:UpdateLibraryItem`.
16 *
17 * Updates a library item's publication status or categories. Provide the implementation with
18 * `Effect.provide(AWS.QApps.UpdateLibraryItemHttp)`.
19 * ### Library Items
20 * **Example:** Disable a Library Item
21 * ```typescript
22 * // init — bind the operation to the Q App
23 * const updateLibraryItem = yield* AWS.QApps.UpdateLibraryItem(app);
24 *
25 * // runtime
26 * yield* updateLibraryItem({ libraryItemId, status: "DISABLED" });
27 * ```
28 *
29 * @binding
30 */
31export interface UpdateLibraryItem extends Binding.Service<
32 UpdateLibraryItem,
33 "AWS.QApps.UpdateLibraryItem",
34 (
35 app: QApp,
36 ) => Effect.Effect<
37 (
38 request: UpdateLibraryItemRequest,
39 ) => Effect.Effect<
40 qapps.UpdateLibraryItemOutput,
41 qapps.UpdateLibraryItemError
42 >
43 >
44> {}
45
46export const UpdateLibraryItem = Binding.Service<UpdateLibraryItem>(
47 "AWS.QApps.UpdateLibraryItem",
48);