import { Event, Message } from '@botpress/client';
import { WorkflowCallbackEventType } from '../runtime/events';
import type { EventName, EventPayload } from '../_types/events';
/**
 * Type for a typed event with a specific event name and corresponding payload.
 * This is used as the return type for isEventOfType type guard.
 */
export type TypedEvent<T extends EventName> = Event & {
    type: T;
    payload: EventPayload<T>;
};
export declare function isEvent(event: unknown): event is Event;
export declare function isEventMessage(event: Event): event is Event & {
    type: 'message_created';
    payload: {
        message: Message;
    };
};
export declare function isWorkflowCallback(event: unknown): event is WorkflowCallbackEventType;
export declare function isMessage(message: unknown): message is Message;
/**
 * Type guard to check if an event matches a specific event type.
 * Works with both custom events and integration events.
 *
 * @example
 * // Custom event
 * if (isEventOfType(event, 'orderPlaced')) {
 *   // event.payload is typed as the orderPlaced schema
 *   console.log(event.payload.orderId)
 * }
 *
 * @example
 * // Integration event
 * if (isEventOfType(event, 'slack:reactionAdded')) {
 *   // event.payload is typed as the slack reactionAdded event payload
 *   console.log(event.payload.reaction)
 * }
 */
export declare function isEventOfType<T extends EventName>(event: unknown, eventName: T): event is TypedEvent<T>;
//# sourceMappingURL=events.d.ts.map