<?php

declare(strict_types=1);

namespace Plugin\tnt_mcp\src\Mcp\Action;

/**
 * What an action touches beyond the row the caller asked about. This exists because the
 * transaction wrapper can only roll back the `Db` part: a flushed cache, a written file, a sent
 * mail and an outbound HTTP call all survive a rollback, so an entry that declares them is
 * declaring the limits of its own undo promise.
 *
 * String-backed so a YAML `sideEffects:` value maps straight onto a case.
 */
enum SideEffect: string
{
    case Db              = 'db';
    case CacheFlushTags  = 'cacheFlushTags';
    case CacheFlushAll   = 'cacheFlushAll';
    case Filesystem      = 'filesystem';
    case Mail            = 'mail';
    case Http            = 'http';
}
