import { z } from 'zod';
import { ConnectorInterface } from '../connector/connector.interface';
import { ConnectorOrigin } from '../type-enums';
import { ActionInterface } from '../workflow';
export type WebhookInputParameterSelectors = {
    selector: string;
    items?: WebhookInputParameters;
};
export type WebhookInputParameters = Record<string, string | WebhookInputParameterSelectors>;
export declare const WebhookInputParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion>;
export declare enum WebhookValidationOperator {
    equals = "equals",
    contains = "contains",
    startsWith = "startsWith",
    endsWith = "endsWith"
}
export type WebhookValidationParameter = {
    selector: string;
    operator?: WebhookValidationOperator;
    value: string;
};
export declare const WebhookValidationParameterSchema: z.ZodObject<{
    selector: z.ZodString;
    operator: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof WebhookValidationOperator>>>;
    value: z.ZodString;
}, z.core.$strip>;
export declare const WebhookValidationSchema: z.ZodArray<z.ZodObject<{
    selector: z.ZodString;
    operator: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof WebhookValidationOperator>>>;
    value: z.ZodString;
}, z.core.$strip>>;
export declare const WebhookSchema: z.ZodObject<{
    identifier: z.ZodString;
    name: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    actionIdentifier: z.ZodString;
    inputParameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>[]>>>;
    validation: z.ZodOptional<z.ZodArray<z.ZodObject<{
        selector: z.ZodString;
        operator: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof WebhookValidationOperator>>>;
        value: z.ZodString;
    }, z.core.$strip>>>;
}, z.core.$strip>;
export interface WebhookInterface {
    connectorIdentifier: string;
    identifier: string;
    name: string;
    description?: string;
    actionIdentifier: string;
    inputParameters?: WebhookInputParameters;
    validation?: Array<WebhookValidationParameter>;
}
export interface WebhookRecordInterface extends WebhookInterface {
    id: string;
    tenantIdentifier: string;
    mode: ConnectorOrigin;
    createdAt: Date;
    updatedAt: Date;
}
export type WebhookDetailConnectorType = Omit<ConnectorInterface, 'actions' | 'webhooks' | 'config'>;
export interface WebhookDetailInterface extends WebhookRecordInterface {
    action: ActionInterface;
    connector: WebhookDetailConnectorType;
}
