feat(ADM-018): completed feature
This commit is contained in:
16
project/src/modules/inventory/index.ts
Normal file
16
project/src/modules/inventory/index.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/** Public API of the inventory module. */
|
||||
import type pg from 'pg';
|
||||
import { InventoryService } from './application/inventory-service.js';
|
||||
import { PgInventoryRepository } from './infrastructure/pg-inventory-repository.js';
|
||||
|
||||
export { registerInventoryRoutes, type InventoryRoutesDeps } from './api/inventory.routes.js';
|
||||
export { InventoryService } from './application/inventory-service.js';
|
||||
export type {
|
||||
InventoryRepository,
|
||||
InventoryService as InventoryServicePort,
|
||||
} from './domain/ports.js';
|
||||
export type { Availability, StockCommand, StockItem, StockState } from './domain/stock.js';
|
||||
|
||||
export function createInventoryService(pool: pg.Pool): InventoryService {
|
||||
return new InventoryService(new PgInventoryRepository(pool));
|
||||
}
|
||||
Reference in New Issue
Block a user