import { Err, FunctionLike } from "@functionless/ast"; import { RulePredicateFunction } from "../rule"; import * as functionless_event_bridge from "../types"; import { PatternDocument } from "./pattern"; /** * Turns a pattern document into the Event Bridge Pattern format. * * To transform from a {@link EventBusPredicateFunction}, first call {@link synthesizePatternDocument}. * * { * doc: { * source: { * value: "lambda" * } * } * } * * becomes * * { * source: ["lambda"] * } */ export declare const synthesizeEventPattern: (document: PatternDocument) => functionless_event_bridge.FunctionlessEventPattern; /** * Turns a Typescript function into a Pattern Document, which is the intermediate state used by * functionless to generate event pattern. * * (event) => event.source === "lambda" * * { * doc: { * source: { * value: "lambda" * } * } * } * * Use {@link synthesizeEventPattern} to generate a Event Pattern usable by event bridge. * * https://github.com/functionless/functionless/issues/37#issuecomment-1066313146 */ export declare const synthesizePatternDocument: (predicate: RulePredicateFunction | FunctionLike | Err | undefined) => PatternDocument; /** * AND logic between two collections of patterns. * * Event bridge supports AND logic between fields * * { field1: Pattern } && { field2: Pattern } * => { field1: Pattern, field2: Pattern } * * When both documents contain the same field, Event bridge may support AND between two patterns on a single field. * See {@link andMergePattern} */ export declare const andDocuments: (classDocument1: PatternDocument, classDocument2: PatternDocument) => PatternDocument; export declare const deploymentOnlyModule = true; //# sourceMappingURL=synth.d.ts.map