michangarrito/apps/backend/dist/modules/messaging/messaging.service.d.ts
rckrdmrd 48dea7a5d0 feat: Initial commit - michangarrito
Marketplace móvil para negocios locales mexicanos.

Estructura inicial:
- apps/backend (NestJS API)
- apps/frontend (React Web)
- apps/mobile (Expo/React Native)
- apps/mcp-server (Claude MCP Server)
- apps/whatsapp-service (WhatsApp Business API)
- database/ (PostgreSQL DDL)
- docs/ (Documentación)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 04:41:02 -06:00

32 lines
1.6 KiB
TypeScript

import { Repository } from 'typeorm';
import { Conversation } from './entities/conversation.entity';
import { Message, MessageDirection, MessageType } from './entities/message.entity';
import { Notification } from './entities/notification.entity';
export declare class MessagingService {
private readonly conversationRepo;
private readonly messageRepo;
private readonly notificationRepo;
constructor(conversationRepo: Repository<Conversation>, messageRepo: Repository<Message>, notificationRepo: Repository<Notification>);
getConversations(tenantId: string): Promise<Conversation[]>;
getConversation(tenantId: string, id: string): Promise<Conversation>;
findOrCreateConversation(tenantId: string, phoneNumber: string, contactName?: string): Promise<Conversation>;
getMessages(conversationId: string, limit?: number): Promise<Message[]>;
addMessage(conversationId: string, direction: MessageDirection, content: string, type?: MessageType, metadata?: {
waMessageId?: string;
mediaUrl?: string;
mediaMimeType?: string;
}): Promise<Message>;
markAsRead(tenantId: string, conversationId: string): Promise<Conversation>;
getNotifications(tenantId: string, userId?: string, unreadOnly?: boolean): Promise<Notification[]>;
createNotification(tenantId: string, data: {
userId?: string;
notificationType: string;
channels: string[];
title: string;
body: string;
data?: Record<string, unknown>;
}): Promise<Notification>;
markNotificationRead(notificationId: string): Promise<Notification>;
getUnreadCount(tenantId: string, userId?: string): Promise<number>;
}