import * as Effect from "effect/Effect"; import type { DataSource } from "./DataSource.ts"; import type { Index } from "./SearchIndex.ts"; /** * Shared scaffolding for AWS Kendra HTTP bindings. * * NOT exported from `index.ts` — every `{Op}Http.ts` in this service is a * thin `Layer.effect(Cap, make…HttpBinding({ … }))` over one of the two * builders below. Everything except the operation and the IAM action list is * boilerplate: every Kendra data-plane operation is scoped to one index * (whose id is injected as `IndexId` and whose ARN receives the grant), and * the sync-job operations are additionally scoped to one data source (whose * id is injected as `Id` and whose ARN receives the grant alongside its * parent index's). */ /** * Build the impl Effect for an index-scoped Kendra operation (query, * retrieve, document batches, principal mapping, suggestions config, …): the * runtime callable injects the bound {@link Index}'s id as `IndexId` and the * deploy-time half grants `actions` on the index ARN (plus any * `subResources` suffix patterns, e.g. `data-source/*` for the * principal-mapping operations that also act on data-source-scoped groups). * * `prepare` (optional) maps a friendlier public request shape onto the wire * request — e.g. `UpdateQuerySuggestionsConfig` converts a `Duration.Input` * into the wire `QueryLogLookBackWindowInDays`. It defaults to identity. */ export declare const makeKendraIndexHttpBinding: >(options: { /** Fully-qualified binding tag, e.g. `AWS.Kendra.Query`. */ tag: string; /** The distilled operation; `IndexId` is injected from the index. */ operation: Effect.Effect<(input: I) => Effect.Effect, never, R>; /** IAM actions granted on the index ARN. */ actions: readonly string[]; /** * Extra ARN suffix patterns (relative to the index ARN) the actions are * also granted on, e.g. `data-source/*` or * `access-control-configuration/*`. */ subResources?: readonly string[]; /** Map the public request shape to the wire request (defaults to identity). */ prepare?: (request: Req) => Omit; }) => Effect.Effect<(index: Index) => Effect.Effect<(request?: Req | undefined) => Effect.Effect, never, never>, never, R>; /** * Build the impl Effect for a data-source-scoped Kendra operation (the sync * job start/stop/list trio): the runtime callable injects the bound * {@link DataSource}'s id as `Id` and its parent index's id as `IndexId`; * the deploy-time half grants `actions` on the data source ARN **and** the * parent index ARN — Kendra authorizes sync-job actions against both. */ export declare const makeKendraDataSourceHttpBinding: (options: { /** Fully-qualified binding tag, e.g. `AWS.Kendra.StartDataSourceSyncJob`. */ tag: string; /** * The distilled operation; `Id` and `IndexId` are injected from the data * source. */ operation: Effect.Effect<(input: I) => Effect.Effect, never, R>; /** IAM actions granted on the data source ARN + its parent index ARN. */ actions: readonly string[]; }) => Effect.Effect<(dataSource: DataSource) => Effect.Effect<(request?: Omit | undefined) => Effect.Effect, never, never>, never, R>; //# sourceMappingURL=BindingHttp.d.ts.map