/** A CloudEvents filter expression (Subscriptions API 3.2.4) over a command's `action`. */ export type ActionFilterExpression = { exact: { action: string; }; } | { prefix: { action: string; }; } | { suffix: { action: string; }; } | { all: ActionFilterExpression[]; } | { any: ActionFilterExpression[]; } | { not: ActionFilterExpression; }; /** * A predicate on an action NAME: the bus asks it once per action and keeps the * answer, so it must depend on the name alone. `createActionFilter` builds one * from CloudEvents expressions; any `(action) => boolean` of the name is one. */ export type ActionFilter = (action: string) => boolean; /** * Compile CloudEvents filter expressions (ANDed; an empty set selects every * action) into an {@link ActionFilter}. Throws `core:invalid:filter` on what * the spec says MUST be rejected. * * @example * bus.use(cache({ actionFilter: createActionFilter([{ suffix: { action: 'Get' } }]) })); * createMcpHandler(bus, { actionFilter: createActionFilter([{ all: [{ prefix: { action: 'cart' } }, { not: { exact: { action: 'cartClear' } } }] }]) }); */ export declare const createActionFilter: (expressions: ActionFilterExpression[]) => ActionFilter; //# sourceMappingURL=action-filter.d.ts.map