import * as Effect from "effect/Effect"; import type { QApp } from "./QApp.ts"; /** * Shared HTTP scaffolding for the Amazon Q Apps runtime 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 builders * below. Everything except the operation and the IAM action list is * boilerplate: every Q Apps operation runs against the Q Business * application environment instance of the bound {@link QApp} (its * `instanceId` is injected as the `instance-id` header), and app-keyed * operations additionally inject the bound app's `appId`. * * Two IAM grant shapes: * * - {@link makeQAppHttpBinding} — operations keyed by the bound Q App or one * of its sessions. Granted on the app's ARN and its sub-resources * (`{appArn}`, `{appArn}/*` — Q App session ARNs are children of the app * ARN). * - {@link makeQAppsInstanceHttpBinding} — instance-level operations * (library items, categories, listing, generation). Library-item and * category authorization ARNs are service-assigned and not derivable from * a bound Q App, so these grant on `Resource: ["*"]`. */ /** * Build the impl Effect for a Q Apps operation keyed by the bound * {@link QApp} (or one of its sessions): the runtime callable injects the * app's `instanceId` (and, with `injectAppId`, its `appId`); the deploy-time * half grants `iamActions` on the app ARN and its session sub-resources. */ export declare const makeQAppHttpBinding: (options: { /** * Short capability name used in the binding sid and runtime span, e.g. * `"StartQAppSession"`. */ capability: string; /** IAM actions granted on the app ARN + `{appArn}/*`. */ iamActions: readonly string[]; /** The distilled operation; `instanceId` (and `appId`) are injected. */ operation: Effect.Effect<(input: I) => Effect.Effect, never, R>; /** Inject the bound app's `appId` into the request. */ injectAppId?: boolean; }) => Effect.Effect<(app: QApp) => Effect.Effect<(request?: Omit | undefined) => Effect.Effect, never, never>, never, R>; /** * Build the impl Effect for an instance-level Q Apps operation (library * items, categories, listing, generation): the runtime callable injects the * bound {@link QApp}'s `instanceId`. Library-item and category authorization * ARNs are service-assigned and not derivable from a bound Q App, so the * deploy-time half grants `iamActions` on `Resource: ["*"]`. */ export declare const makeQAppsInstanceHttpBinding: (options: { /** * Short capability name used in the binding sid and runtime span, e.g. * `"ListLibraryItems"`. */ capability: string; /** IAM actions granted on `Resource: ["*"]`. */ iamActions: readonly string[]; /** The distilled operation; `instanceId` is injected. */ operation: Effect.Effect<(input: I) => Effect.Effect, never, R>; }) => Effect.Effect<(app: QApp) => Effect.Effect<(request?: Omit | undefined) => Effect.Effect, never, never>, never, R>; //# sourceMappingURL=BindingHttp.d.ts.map