export type SessionObject = {
    authenticated: boolean;
    role?: string;
};
import type { z } from "zod";
import type { ActionState } from "../types";
type PublicAction = {
    isPrivate: false;
};
type PrivateAction = {
    isPrivate: true;
};
type RoleBasedAction = {
    isPrivate: true;
    allowedRoles: string[];
};
type ActionType = PublicAction | PrivateAction | RoleBasedAction;
type ActionWithInputs<TInput, TOutput> = {
    withInputs: true;
    handler: (validatedData: TInput) => Promise<ActionState<TInput, TOutput>>;
    schema: z.Schema<TInput>;
};
type ActionWithoutInputs<TOutput> = {
    withInputs: false;
    handler: () => Promise<ActionState<undefined, TOutput>>;
};
type Action<TInput, TOutput> = ActionWithInputs<TInput, TOutput> | ActionWithoutInputs<TOutput>;
type SafeActionProps<TInput, TOutput> = {
    action: Action<TInput, TOutput>;
    actionType: ActionType;
};
export declare const createSafeAction: <TInput, TOutput>({ action, actionType, }: SafeActionProps<TInput, TOutput>) => (data: TInput) => Promise<ActionState<TInput, TOutput>>;
export {};
