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>;
}