import { DeleteDTO } from '@hed-hog/api';
import { MailService as MailMainService } from '@hed-hog/api-mail';
import { PaginationDTO, PaginationService } from '@hed-hog/api-pagination';
import { PrismaService } from '@hed-hog/api-prisma';
import { HttpService } from '@nestjs/axios';
import { Request, Response } from 'express';
import { MailService } from '../mail/mail.service';
import { SettingService } from '../setting/setting.service';
import { CreateWebhookActionDTO, UpdateWebhookActionDTO } from './dto/webhook-action.dto';
type WebhookActionPayload = CreateWebhookActionDTO | UpdateWebhookActionDTO | Record<string, unknown>;
export declare class WebhookIntegrationService {
    private readonly prisma;
    private readonly pagination;
    private readonly http;
    private readonly mailMainService;
    private readonly coreMailService;
    private readonly settingService;
    private readonly logEmitter;
    constructor(prisma: PrismaService, pagination: PaginationService, http: HttpService, mailMainService: MailMainService, coreMailService: MailService, settingService: SettingService);
    private get integrations();
    private get actions();
    private get logs();
    private get actionLogs();
    list(paginationParams: PaginationDTO): Promise<{
        data: any[];
        total: any;
        lastPage: number;
        page: number;
        pageSize: number;
        prev: number;
        next: number;
    }>;
    get(id: number): Promise<any>;
    create(data: any): Promise<any>;
    update(id: number, data: any): Promise<any>;
    delete(data: DeleteDTO): Promise<any>;
    regenerateUuid(id: number): Promise<any>;
    regenerateToken(id: number): Promise<any>;
    private getApplicationBaseUrl;
    private withPublicUrl;
    private withPublicUrls;
    listActions(integrationId: number): Promise<any>;
    createAction(integrationId: number, data: WebhookActionPayload): Promise<any>;
    updateAction(integrationId: number, actionId: number, data: WebhookActionPayload): Promise<any>;
    deleteActions(integrationId: number, data: DeleteDTO): Promise<any>;
    listLogs(integrationId: number, paginationParams: PaginationDTO, sort?: 'asc' | 'desc'): Promise<{
        total: any;
        lastPage: number;
        page: number;
        pageSize: number;
        prev: number;
        next: number;
        data: any;
    }>;
    streamLogs(integrationId: number, res: Response): void;
    executePublic(uuid: string, body: any, headers: any, req: Request): Promise<{
        success: boolean;
        actions: any[];
    }>;
    private executeAction;
    private executeEmailAction;
    private executeWhatsappAction;
    private validateToken;
    private validateIp;
    private validateActionConfiguration;
    private validateBodySchema;
    private validateJsonSchema;
    private matchesJsonSchemaType;
    private createCallLog;
    private createActionLogs;
    private extractErrorMessage;
    private extractErrorResponse;
    private extractErrorRequestPayload;
    private attachErrorRequestPayload;
    private normalizeWhatsappTarget;
    private getRemoteIp;
    private ensureAction;
    private ensureSlugAvailable;
    private normalizeIntegration;
    private normalizeAction;
    private nullableString;
    private nullableNumber;
    private buildMailConfig;
}
export {};
//# sourceMappingURL=webhook-integration.service.d.ts.map