import { aws_events } from "aws-cdk-lib";
import { Integration } from "../integration";
import { DynamicProps, IEventBus, IntegrationWithEventBus, IntegrationWithEventBusProps } from "./event-bus";
import { IRule } from "./rule";
import { Event } from "./types";
/**
 * A function interface used by the {@link Rule}'s map function.
 *
 * event is the event matched by the rule. This argument is optional.
 * $utils is a collection of built-in utilities wrapping EventBridge TargetInputs like contextual constants available to the transformer.
 *
 * @typeParam - Evnt - The event type from the {@link Rule}.
 * @typeParam - OutEvnt - The narrowed event type after the transform is applied.
 */
export declare type EventTransformFunction<in Evnt extends Event, out OutEvnt = any> = (event: Evnt, $utils: EventTransformUtils) => OutEvnt;
/**
 * https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-transform-target-input.html#eb-transform-input-predefined
 */
export interface EventTransformUtils {
    context: {
        ruleArn: string;
        ruleName: string;
        ingestionTime: string;
        eventJson: string;
    };
}
/**
 * Represents an event that has been transformed using Target Input Transformers.
 * https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-transform-target-input.html
 *
 * @see Rule.map for more details on transforming event details.
 *
 * @typeParam - Evnt - The event type from the {@link Rule}.
 * @typeParam - Out - The narrowed event type after the transform is applied.
 * @typeParam - OutEvnt - Covariant form of {@link Evnt}. Should be inferred.
 */
export declare class EventTransform<in Evnt extends Event, out Out, out OutEvnt extends Evnt = Evnt> {
    readonly rule: IRule<OutEvnt>;
    readonly targetInput: aws_events.RuleTargetInput;
    /**
     * This static property identifies this class as an EventTransform to the TypeScript plugin.
     */
    static readonly FunctionlessType = "EventTransform";
    constructor(func: EventTransformFunction<Evnt, Out>, rule: IRule<OutEvnt>);
    /**
     * Defines a target of the {@link EventTransform}'s rule using this TargetInput.
     *
     * EventBus is not a valid pipe target for transformed events.
     *
     * @see Rule.pipe for more details on pipe.
     */
    pipe<I extends IntegrationWithEventBus<Out, any>>(integration: NonEventBusIntegration<I>, ...props: Parameters<DynamicProps<IntegrationWithEventBusProps<I>>>): void;
    pipe(callback: (targetInput: aws_events.RuleTargetInput) => aws_events.IRuleTarget): void;
}
/**
 * EventBus to EventBus input transform is not allowed.
 */
export declare type NonEventBusIntegration<I extends Integration<any, any, any>> = I extends IEventBus<any> ? never : I;
export declare const deploymentOnlyModule = true;
//# sourceMappingURL=transform.d.ts.map