/**
 * Sales Return Side Effects Port
 * Interface for sending notifications and external integrations
 */

import type { SalesReturn } from '../domain/sales-return.model';

export interface SalesReturnSideEffectsPort {
  /**
   * Record inventory receipt movements for restockable returned items
   */
  recordInventoryReceipt(salesReturn: SalesReturn, byUserId?: string): Promise<void>;

  /**
   * Notify customer of return approval
   */
  notifyReturnApproved(salesReturn: SalesReturn): Promise<void>;

  /**
   * Notify customer of return rejection
   */
  notifyReturnRejected(
    salesReturn: SalesReturn,
    reason: string
  ): Promise<void>;

  /**
   * Notify customer that return was received
   */
  notifyReturnReceived(salesReturn: SalesReturn): Promise<void>;

  /**
   * Notify customer of refund issuance
   */
  notifyRefundIssued(
    salesReturn: SalesReturn,
    amount: number,
    method: string
  ): Promise<void>;

  /**
   * Create activity log entry
   */
  logActivity(params: {
    returnId: string;
    action: string;
    message: string;
    by: string;
    byName?: string;
  }): Promise<void>;
}
