ruch
Version:
Revolutionary React TypeScript CLI with hexagonal architecture & AI-powered development assistance. Create maintainable, scalable applications with domain-driven design and integrated AI tooling.
32 lines (27 loc) • 725 B
text/typescript
import type { ProductEntity, ProductCreationData, ProductUpdateData } from '../entities/Product';
/**
* Port interface for Product domain
* This interface defines the contract that adapters must implement
*/
export interface ProductPort {
/**
* Get all product entities
*/
getAll(): Promise<ProductEntity[]>;
/**
* Get a product entity by ID
*/
getById(id: string): Promise<ProductEntity>;
/**
* Create a new product entity
*/
create(data: ProductCreationData): Promise<ProductEntity>;
/**
* Update an existing product entity
*/
update(id: string, data: ProductUpdateData): Promise<ProductEntity>;
/**
* Delete a product entity
*/
delete(id: string): Promise<void>;
}