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

main
ts 46 lines 1.4 KB
Raw
1 import type * as kendra from "@distilled.cloud/aws/kendra";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Index } from "./SearchIndex.ts";
5
6 /**
7 * `GetQuerySuggestions` request with `IndexId` injected from the bound index.
8 */
9 export interface GetQuerySuggestionsRequest extends Omit<
10 kendra.GetQuerySuggestionsRequest,
11 "IndexId"
12 > {}
13
14 /**
15 * Runtime binding for the `GetQuerySuggestions` operation (IAM action
16 * `kendra:GetQuerySuggestions`), scoped to one {@link Index}.
17 *
18 * Fetches typeahead query suggestions for a partial query string, based
19 * on the index's query history and/or document fields.
20 * Provide the implementation with
21 * `Effect.provide(AWS.Kendra.GetQuerySuggestionsHttp)`.
22 *
23 * ### Query Suggestions
24 * **Example:** Typeahead Suggestions
25 * ```typescript
26 * const suggest = yield* AWS.Kendra.GetQuerySuggestions(index);
27 *
28 * const { Suggestions } = yield* suggest({ QueryText: "how to conf" });
29 * ```
30 *
31 * @binding
32 */
33 export interface GetQuerySuggestions extends Binding.Service<
34 GetQuerySuggestions,
35 "AWS.Kendra.GetQuerySuggestions",
36 (
37 index: Index,
38 ) => Effect.Effect<
39 (
40 request: GetQuerySuggestionsRequest,
41 ) => Effect.Effect<kendra.GetQuerySuggestionsResponse, kendra.GetQuerySuggestionsError>
42 >
43 > {}
44 export const GetQuerySuggestions = Binding.Service<GetQuerySuggestions>(
45 "AWS.Kendra.GetQuerySuggestions",
46 );