/**
 * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/owning-delete-cascade/events.md
 *
 * Shared event-shape constants for the TR-022 owning-entity hard-delete
 * cascade. The cascade's input detail-type (on the data event bus) and
 * its two terminal detail-types (on the ops event bus) are owned by
 * `@openhi/workflows`; this module re-imports them so the workflow
 * construct can wire the EventBridge rule and the terminal publisher
 * from a single place.
 */

/**
 * Stable logical name registered with the shared `WorkflowDedupTable`
 * (TR-015). The state machine's `DedupCheck` state writes a row keyed
 * by `(consumerName, eventId, attempt)` to absorb EventBridge retries.
 */
declare const OWNING_DELETE_CASCADE_CONSUMER_NAME: "owning-delete-cascade";
/**
 * Map-state max concurrency. Per the ADR-018 implementation guide
 * section 4: inline Map (NOT Distributed Map — that lives on TR-023's
 * rename cascade), tunable via the construct's `cascadeMapConcurrency`
 * prop. Operators may scale this down on first rollout.
 */
declare const OWNING_DELETE_CASCADE_DEFAULT_CONCURRENCY: 8;
/**
 * Stuck-cascade alarm threshold. Per the implementation guide section
 * 4 "Observability" — operator-tunable via
 * `stuckCascadeThresholdMinutes` on the construct prop.
 */
declare const OWNING_DELETE_CASCADE_STUCK_THRESHOLD_MINUTES: 15;
/**
 * Inputs each cascade Map iteration receives. The state machine
 * builds one of these per chunk and passes them in via `ItemsPath`.
 * The handler then issues a single `TransactWriteItems` for the
 * entire chunk.
 */
interface CascadeChunkInput {
    /** Owner identity carried through every step for observability. */
    readonly ownerType: "Workspace" | "User";
    readonly ownerId: string;
    readonly tenantId?: string;
    /** Rows to delete in this chunk. Length must be 1..100. */
    readonly rows: ReadonlyArray<{
        readonly entity: string;
        readonly key: Record<string, string>;
    }>;
    /**
     * Idempotency token uniquely identifying this chunk within the
     * cascade execution. Forwarded to `executeMultiWrite` so replayed
     * chunks land idempotently (per AWS SDK `ClientRequestToken`).
     */
    readonly chunkToken: string;
}
/** Inputs the cascade list-and-chunk step receives. */
interface CascadeListInput {
    readonly ownerType: "Workspace" | "User";
    readonly ownerId: string;
    readonly tenantId?: string;
    /** Per-entity cursor map from the previous page (start of run is `{}`). */
    readonly cursors?: Record<string, string | null>;
    /**
     * Cumulative `projectionsRemoved` count carried forward across
     * pages — emitted on the terminal `complete` event.
     */
    readonly projectionsRemoved?: number;
    /** Cumulative `chunkCount` carried forward across pages. */
    readonly chunkCount?: number;
}
/** Outputs the cascade list-and-chunk step emits to feed the Map state. */
interface CascadeListOutput {
    readonly ownerType: "Workspace" | "User";
    readonly ownerId: string;
    readonly tenantId?: string;
    readonly cursors: Record<string, string | null>;
    readonly chunks: ReadonlyArray<CascadeChunkInput>;
    readonly exhausted: boolean;
    readonly projectionsRemoved: number;
    readonly chunkCount: number;
}
/** Inputs the cascade finalize step receives. */
interface CascadeFinalizeInput {
    readonly ownerType: "Workspace" | "User";
    readonly ownerId: string;
    readonly tenantId?: string;
    readonly projectionsRemoved: number;
    readonly chunkCount: number;
    readonly startedAt: string;
    /** Optional eventId / correlation carried through the run for ADR-016 envelope. */
    readonly eventId?: string;
    readonly correlationId?: string;
    readonly causationId?: string;
}
/** Outputs the cascade finalize step emits (used by tests and telemetry). */
interface CascadeFinalizeOutput {
    readonly ownerType: "Workspace" | "User";
    readonly ownerId: string;
    readonly tenantId?: string;
    readonly projectionsRemoved: number;
    readonly chunkCount: number;
    readonly durationMs: number;
    readonly completedAt: string;
    readonly canonicalDeleted: boolean;
}
/** Env var the construct uses to inject the ops event bus name into the finalize Lambda. */
declare const OWNING_DELETE_OPS_EVENT_BUS_ENV_VAR: "OWNING_DELETE_OPS_EVENT_BUS_NAME";

export { type CascadeChunkInput as C, OWNING_DELETE_CASCADE_CONSUMER_NAME as O, type CascadeFinalizeInput as a, type CascadeFinalizeOutput as b, type CascadeListInput as c, type CascadeListOutput as d, OWNING_DELETE_CASCADE_DEFAULT_CONCURRENCY as e, OWNING_DELETE_CASCADE_STUCK_THRESHOLD_MINUTES as f, OWNING_DELETE_OPS_EVENT_BUS_ENV_VAR as g };
