import { EntityDeleteOptions, EntitySaveOptions } from '@memberjunction/core';
import { MJConversationDetailEntity } from '../generated/entity_subclasses.js';
/**
 * Server-side defense-in-depth for conversation sharing. The Angular chat UI
 * disables the message input when the current user only holds `View` access,
 * but that's a cosmetic gate — a determined caller could still hit the API
 * directly. This override blocks Create/Update/Delete of conversation
 * messages unless the context user is either:
 *
 *  1. The conversation's owner (`MJ: Conversations.UserID`), or
 *  2. A grantee on `MJ: Resource Permissions` with `PermissionLevel` of
 *     `Edit` or `Owner` (directly or via role) and `Status='Approved'`.
 *
 * Additionally, the **rating fields** (`UserRating` and `UserFeedback`) are
 * owner-only — even users with `Edit`-level grants on the conversation are
 * blocked from changing them, because the storage is a single value per
 * message (it represents the owner's evaluation, not per-grantee opinions).
 * MJ's permissions engine has no native primitive for per-field row-conditional
 * write rules, so this gate lives here rather than in `MJ: Entity Permissions`.
 *
 * Runs on the server only (`ProviderType === 'Database'`) — client-side
 * executions pass straight through to `super` so offline/optimistic paths
 * still work. `ResourcePermissionEngine`'s cache is used to avoid per-save
 * round trips for permission lookups.
 */
export declare class MJConversationDetailEntityExtended extends MJConversationDetailEntity {
    Save(options?: EntitySaveOptions): Promise<boolean>;
    Delete(options?: EntityDeleteOptions): Promise<boolean>;
    private currentUserMayWrite;
    /**
     * Names of the rating/feedback fields that are dirty on this save.
     * Used by `currentUserMayWrite` to detect attempts by non-owners to
     * modify the owner-only fields and surface a specific denial message.
     */
    private dirtyRatingFieldNames;
    /**
     * Populate `LatestResult.Message` so callers that inspect the save result
     * see why the write was refused rather than a generic failure.
     */
    private RecordDenied;
}
/** Tree-shaking guard — referenced from the MJCoreEntities barrel so the decorator fires. */
export declare function LoadMJConversationDetailEntityExtended(): void;
//# sourceMappingURL=MJConversationDetailEntityExtended.d.ts.map