import type { App_RoutingForms_Form, User } from '../../../prisma-client';
import type { Ensure } from "@calcom/types/utils";
import type { SerializableField, OrderedResponses } from "../types/types";
import type { FormResponse, SerializableForm } from "../types/types";
type SelectFieldWebhookResponse = string | number | string[] | {
    label: string;
    id: string | null;
};
export type FORM_SUBMITTED_WEBHOOK_RESPONSES = Record<string, {
    /**
     * Deprecates `value` prop as it now has both the id(that doesn't change) and the label(that can change but is human friendly)
     */
    response: number | string | string[] | SelectFieldWebhookResponse | SelectFieldWebhookResponse[];
    /**
     * @deprecated Use `response` instead
     */
    value: FormResponse[keyof FormResponse]["value"];
}>;
export declare function getFieldResponse({ field, fieldResponseValue, }: {
    fieldResponseValue: FormResponse[keyof FormResponse]["value"];
    field: Pick<SerializableField, "type" | "options">;
}): {
    value: string | number | string[];
    response: string | number | string[];
} | {
    value: string[];
    response: {
        label: string;
        id: string | null;
    }[];
};
/**
 * Not called in preview mode or dry run mode
 * It takes care of sending webhooks and emails for form submissions
 */
export declare function _onFormSubmission(form: Ensure<SerializableForm<App_RoutingForms_Form> & {
    user: Pick<User, "id" | "email">;
    userWithEmails?: string[];
}, "fields">, response: FormResponse, responseId: number, chosenAction?: {
    type: "customPageMessage" | "externalRedirectUrl" | "eventTypeRedirectUrl";
    value: string;
}): Promise<void>;
export declare const onFormSubmission: (form: Ensure<Omit<{
    id: string;
    description: string | null;
    position: number;
    routes: import('../../../prisma-client').Prisma.JsonValue | null;
    createdAt: Date;
    updatedAt: Date;
    name: string;
    fields: import('../../../prisma-client').Prisma.JsonValue | null;
    updatedById: number | null;
    userId: number;
    teamId: number | null;
    disabled: boolean;
    settings: import('../../../prisma-client').Prisma.JsonValue | null;
}, "settings" | "fields" | "routes" | "createdAt" | "updatedAt"> & {
    routes: import("../types/types").Routes;
    fields: import("../types/types").Fields;
    settings: import("zod").TypeOf<typeof import('../../../prisma/zod-utils').RoutingFormSettings>;
    createdAt: string;
    updatedAt: string;
    connectedForms: {
        name: string;
        description: string | null;
        id: string;
    }[];
    routers: {
        name: string;
        description: string | null;
        id: string;
    }[];
    teamMembers: import("../types/types").SerializableFormTeamMembers[];
} & {
    user: Pick<User, "id" | "email">;
    userWithEmails?: string[];
}, "fields">, response: FormResponse, responseId: number, chosenAction?: {
    type: "customPageMessage" | "externalRedirectUrl" | "eventTypeRedirectUrl";
    value: string;
} | undefined) => Promise<void>;
export declare const sendResponseEmail: (form: Pick<App_RoutingForms_Form, "id" | "name" | "fields">, orderedResponses: OrderedResponses, toAddresses: string[]) => Promise<void>;
export {};
//# sourceMappingURL=utils.d.ts.map