import type { RepoConfig } from '../core/types.js';
import type { AssetIndexService } from './assets/asset-index-service.js';
import { type AuthUser } from './auth-service.js';
/**
 * Delete authorization for the workspace-wide Assets store (codex-review P1 / D2).
 *
 * `workspace_wide` grants every member write (upload) access, so deletion needs
 * a tighter rule than folder-write: only the asset's uploader (recorded
 * `uploader_user_id`) or a workspace owner may delete it. Returns a denial
 * message, or `null` when the delete is allowed.
 *
 * Pass `filename` for single-file deletes (the filename route): the gate then
 * keys on the row for THAT file, and a legacy file with no index row is
 * owner-only — so a member can't delete a co-located legacy blob just by owning
 * a different indexed asset under the same entity (codex P1). Omit `filename`
 * for whole-entity deletes (gate on every indexed row).
 *
 * Scope: only gates `workspace_wide` folders. Non-workspace_wide folders return
 * `null` here (normal folder-write semantics already applied upstream).
 * Open-mode / API-key callers (`user` undefined) are unrestricted. An entity
 * with no indexed assets in the shared store is unexpected → owner-only.
 */
export declare function assetDeleteDenial(index: AssetIndexService | undefined, repoConfig: RepoConfig | undefined, user: AuthUser | undefined, repo: string, entityType: string, entityId: string, filename?: string): string | null;
/**
 * Delete authorization for a free-standing asset addressed by its immutable
 * `assetId` (the asset-manager delete-by-id route). Same uploader/owner gate as
 * {@link assetDeleteDenial}, but keyed directly on the asset row rather than an
 * entity coordinate. Only gates `workspace_wide` folders; open-mode callers are
 * unrestricted. A missing row resolves owner-only via `index.canDelete`.
 */
export declare function assetDeleteDenialByAssetId(index: AssetIndexService | undefined, repoConfig: RepoConfig | undefined, user: AuthUser | undefined, assetId: string): string | null;
