import type * as frauddetector from "@distilled.cloud/aws/frauddetector"; import type * as Effect from "effect/Effect"; import * as Binding from "../../Binding.ts"; import type { EventType } from "./EventType.ts"; /** * The `eventTypeName` is injected by the binding from the bound event type; * only the `eventId` remains. */ export interface GetEventRequest extends Omit { } /** * Read a stored event (its entities and variable values) back from Amazon * Fraud Detector — the effectful lookup call made from a deployed Lambda or * Task. Events are stored by `SendEvent` or by predictions on an event type * with ingestion enabled. * * ### Reading Stored Events * Provide the `GetEventHttp` implementation layer on the Function effect, * bind the event type in the init phase, then call the returned client at * runtime. The binding grants `frauddetector:GetEvent` on the event type and * injects its `eventTypeName` automatically. * * **Example:** Read from a Lambda * ```typescript * // init * const getEvent = yield* FraudDetector.GetEvent(eventType); * * return { * fetch: Effect.gen(function* () { * // runtime * const { event } = yield* getEvent({ eventId: "order-123" }); * return HttpServerResponse.json({ variables: event?.eventVariables }); * }), * }; * // on the Function effect: * // .pipe(Effect.provide(FraudDetector.GetEventHttp)) * ``` * * @binding */ export interface GetEvent extends Binding.Service Effect.Effect<(request: GetEventRequest) => Effect.Effect>> { } export declare const GetEvent: GetEvent; //# sourceMappingURL=GetEvent.d.ts.map