| 1 | import type * as qapps from "@distilled.cloud/aws/qapps"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { QApp } from "./QApp.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Request for {@link BatchCreateCategory} — `instanceId` is injected from the bound Q App. |
| 8 | */ |
| 9 | export interface BatchCreateCategoryRequest extends Omit< |
| 10 | qapps.BatchCreateCategoryInput, |
| 11 | "instanceId" |
| 12 | > {} |
| 13 | |
| 14 | /** |
| 15 | * Runtime binding for `qapps:BatchCreateCategory`. |
| 16 | * |
| 17 | * Creates library categories that web-experience users use to tag and filter library items. Provide the implementation with |
| 18 | * `Effect.provide(AWS.QApps.BatchCreateCategoryHttp)`. |
| 19 | * ### Categories |
| 20 | * **Example:** Create Categories |
| 21 | * ```typescript |
| 22 | * // init — bind the operation to the Q App |
| 23 | * const batchCreateCategory = yield* AWS.QApps.BatchCreateCategory(app); |
| 24 | * |
| 25 | * // runtime |
| 26 | * yield* batchCreateCategory({ |
| 27 | * categories: [{ title: "HR" }, { title: "Marketing" }], |
| 28 | * }); |
| 29 | * ``` |
| 30 | * |
| 31 | * @binding |
| 32 | */ |
| 33 | export interface BatchCreateCategory extends Binding.Service< |
| 34 | BatchCreateCategory, |
| 35 | "AWS.QApps.BatchCreateCategory", |
| 36 | ( |
| 37 | app: QApp, |
| 38 | ) => Effect.Effect< |
| 39 | ( |
| 40 | request: BatchCreateCategoryRequest, |
| 41 | ) => Effect.Effect< |
| 42 | qapps.BatchCreateCategoryResponse, |
| 43 | qapps.BatchCreateCategoryError |
| 44 | > |
| 45 | > |
| 46 | > {} |
| 47 | |
| 48 | export const BatchCreateCategory = Binding.Service<BatchCreateCategory>( |
| 49 | "AWS.QApps.BatchCreateCategory", |
| 50 | ); |