1import type * as qbusiness from "@distilled.cloud/aws/qbusiness";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Index } from "./SearchIndex.ts";
5
6/**
7 * `ListDocuments` request with `applicationId` + `indexId` injected from the bound index.
8 */
9export interface ListDocumentsRequest extends Omit<
10 qbusiness.ListDocumentsRequest,
11 "applicationId" | "indexId"
12> {}
13
14/**
15 * Runtime binding for the `ListDocuments` operation (IAM action
16 * `qbusiness:ListDocuments`), scoped to one {@link Index}.
17 *
18 * Lists the documents the index holds and their ingestion status.
19 * Provide the implementation with
20 * `Effect.provide(AWS.QBusiness.ListDocumentsHttp)`.
21 *
22 * ### Document Ingestion
23 * **Example:** List Indexed Documents
24 * ```typescript
25 * const listDocuments = yield* AWS.QBusiness.ListDocuments(index);
26 *
27 * const { documentDetailList } = yield* listDocuments();
28 * ```
29 *
30 * @binding
31 */
32export interface ListDocuments extends Binding.Service<
33 ListDocuments,
34 "AWS.QBusiness.ListDocuments",
35 (
36 index: Index,
37 ) => Effect.Effect<
38 (
39 request?: ListDocumentsRequest,
40 ) => Effect.Effect<
41 qbusiness.ListDocumentsResponse,
42 qbusiness.ListDocumentsError
43 >
44 >
45> {}
46export const ListDocuments = Binding.Service<ListDocuments>(
47 "AWS.QBusiness.ListDocuments",
48);