import type { Response } from 'express';
import { type RequestContext } from '../middleware/auth';
export interface ResourceOwnerFields {
    tenantId?: string;
    workspaceId?: string;
    userId?: string;
    /** Compatibility for any interim code that used ownerUserId before the schema settled. */
    ownerUserId?: string;
}
export interface NormalizedResourceOwner {
    tenantId: string;
    workspaceId: string;
    userId: string;
}
export declare function ownerFieldsFromContext(context: RequestContext): NormalizedResourceOwner;
export declare function normalizeResourceOwner(resource: ResourceOwnerFields | null | undefined): NormalizedResourceOwner;
export declare function isOwnedByContext(resource: ResourceOwnerFields | null | undefined, context: RequestContext): boolean;
export declare function ownersMatch(resource: ResourceOwnerFields | null | undefined, ownerFields: ResourceOwnerFields | null | undefined): boolean;
export declare function isPrivilegedRequestContext(context: RequestContext): boolean;
export declare function sendResourceNotFound(res: Response, error?: string): Response;
//# sourceMappingURL=resourceOwnership.d.ts.map