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>
28 lines
1.5 KiB
TypeScript
28 lines
1.5 KiB
TypeScript
import { Repository } from 'typeorm';
|
|
import { InventoryMovement } from './entities/inventory-movement.entity';
|
|
import { StockAlert } from './entities/stock-alert.entity';
|
|
import { Product } from '../products/entities/product.entity';
|
|
import { CreateMovementDto, AdjustStockDto } from './dto/inventory.dto';
|
|
export declare class InventoryService {
|
|
private readonly movementRepo;
|
|
private readonly alertRepo;
|
|
private readonly productRepo;
|
|
constructor(movementRepo: Repository<InventoryMovement>, alertRepo: Repository<StockAlert>, productRepo: Repository<Product>);
|
|
createMovement(tenantId: string, dto: CreateMovementDto, userId?: string): Promise<InventoryMovement>;
|
|
adjustStock(tenantId: string, dto: AdjustStockDto, userId?: string): Promise<InventoryMovement>;
|
|
getMovements(tenantId: string, productId?: string, limit?: number): Promise<InventoryMovement[]>;
|
|
getProductHistory(tenantId: string, productId: string): Promise<InventoryMovement[]>;
|
|
checkStockAlerts(tenantId: string, product: Product): Promise<void>;
|
|
getActiveAlerts(tenantId: string): Promise<StockAlert[]>;
|
|
dismissAlert(tenantId: string, alertId: string): Promise<StockAlert>;
|
|
getLowStockProducts(tenantId: string): Promise<Product[]>;
|
|
getOutOfStockProducts(tenantId: string): Promise<Product[]>;
|
|
getInventoryStats(tenantId: string): Promise<{
|
|
totalProducts: number;
|
|
totalValue: number;
|
|
lowStockCount: number;
|
|
outOfStockCount: number;
|
|
activeAlerts: number;
|
|
}>;
|
|
}
|