feat(ADM-018): completed feature

This commit is contained in:
chattie
2026-08-17 22:23:10 +02:00
parent cf1c69fc8b
commit d595b4871f
871 changed files with 47411 additions and 281 deletions

View File

@@ -0,0 +1,19 @@
/** Public API of the promotions module. */
import type pg from 'pg';
import { PromotionServiceImpl } from './application/promotion-service.js';
import type { PromotionService, PromotionRepository } from './domain/ports.js';
import { PgPromotionRepository } from './infrastructure/pg-promotion-repository.js';
export { registerPromotionsRoutes, type PromotionsRoutesDeps } from './api/promotions.routes.js';
export type { PromotionService as PromotionServicePort } from './domain/ports.js';
export type { PromotionRepository } from './domain/ports.js';
export type {
NewPromotion,
Promotion,
PromotionDiscount,
PromotionType,
} from './domain/promotion.js';
export function createPromotionService(pool: pg.Pool): PromotionService {
return new PromotionServiceImpl(new PgPromotionRepository(pool));
}