import { ChatConversationService } from './chat-conversation.service';
import { BaseTenantService } from '@/common/base/service/base-crud.service';
import { ChatMessage } from './entities/chat-message.entity';
import { TenantConnectionService } from '../tenant/tenant-connection.service';
import { HttpService } from '@nestjs/axios';
import { FileLoggerService } from '@/common/logger/file-logger.service';
import { OaAccountMasterService } from '../tenant/oa-account.service';
import { Request } from 'express';
import { ConversationMessagesPaginated } from './chat.types';
import { SendMessagesDto } from './dto/send-message.dto';
import type { Queue } from 'bull';
import { ChatGateway } from './chat.gateway';
import { RealtimeHelper } from '@/common/helpers/realtime.helper';
import { FacebookSyncService } from './facebook/facebook-sync.service';
export declare class ChatMessageService extends BaseTenantService<ChatMessage> {
    protected tenantConnectionService: TenantConnectionService;
    private conversationService;
    private readonly http;
    private readonly fileLogger;
    private readonly oaMasterService;
    private chatQueue;
    private readonly chatGateway;
    private fbSyncService;
    private readonly realtimeHelper;
    protected entity: typeof ChatMessage;
    private uploadDir;
    constructor(tenantConnectionService: TenantConnectionService, conversationService: ChatConversationService, http: HttpService, fileLogger: FileLoggerService, oaMasterService: OaAccountMasterService, chatQueue: Queue, chatGateway: ChatGateway, fbSyncService: FacebookSyncService, realtimeHelper: RealtimeHelper);
    addMessageJob(messages: ChatMessage[], accessToken: string, subdomain: string): Promise<void>;
    uploadZaloFile(accessToken: string, type: 'image' | 'gif' | 'file' | 'video', filePath: string): Promise<string>;
    sendMessagesBatch(conversationId: string, dto: SendMessagesDto, subdomain: string): Promise<ChatMessage[]>;
    getConversationMessagesPaginated(conversationId: string, page: number | undefined, limit: number | undefined, req: Request, search?: string, subdomain?: string): Promise<ConversationMessagesPaginated>;
    syncAllConversations(oaId: string): Promise<void>;
    private mapZaloMessageToEntity;
    private fetchZaloMessages;
    private saveMessages;
    private syncIncrementalMessages;
    private toDate;
    handleMessage(oaId: string, userId: string, message: any, options: {
        src: number;
        type: 'zalo';
    }): Promise<void>;
    handleWebhook(oaId: any, body: any): Promise<void>;
}
