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) • 674 B
text/typescript
import type { CartEntity, CartCreationData, CartUpdateData } from '../entities/Cart';
/**
* Port interface for Cart domain
* This interface defines the contract that adapters must implement
*/
export interface CartPort {
/**
* Get all cart entities
*/
getAll(): Promise<CartEntity[]>;
/**
* Get a cart entity by ID
*/
getById(id: string): Promise<CartEntity>;
/**
* Create a new cart entity
*/
create(data: CartCreationData): Promise<CartEntity>;
/**
* Update an existing cart entity
*/
update(id: string, data: CartUpdateData): Promise<CartEntity>;
/**
* Delete a cart entity
*/
delete(id: string): Promise<void>;
}