/**
 * @fileoverview Metadata cache for `MJ: Remote Operations` rows — the `@RegisterForStartup` engine the
 * generic `ExecuteRemoteOperation` resolver consults to gate dispatch on the operation's metadata
 * (Status / approval), independent of the in-code ClassFactory registration.
 *
 * Why this exists as defense-in-depth: CodeGen only emits Active + Approved operations, so a Disabled or
 * unapproved op normally has no generated class and is therefore unregistered + already unreachable. But a
 * hand-authored (`GenerationType='Manual'`) op keeps its `@RegisterClass` decorator in source even if the
 * metadata row is later set to `Status='Disabled'`. This engine lets the resolver honor that metadata state
 * at runtime — a registered-but-disabled op is rejected — with a synchronous in-memory cache hit (no per-call
 * DB query), kept fresh by the BaseEngine entity-event subscription.
 *
 * @module @memberjunction/core-entities
 */
import { BaseEngine, IMetadataProvider, UserInfo } from '@memberjunction/core';
import { MJRemoteOperationEntity } from '../generated/entity_subclasses.js';
/** Why an operation is not currently invokable (for a clear caller-facing rejection). */
export interface RemoteOperationInvokabilityResult {
    /** True when the operation may be dispatched. */
    Invokable: boolean;
    /** Machine-readable reason code when not invokable (e.g. `OPERATION_DISABLED`, `OPERATION_NOT_APPROVED`). */
    ResultCode?: string;
    /** Human-readable reason when not invokable. */
    Reason?: string;
}
/**
 * Caches every `MJ: Remote Operations` row and answers "may this operation key be dispatched?" from metadata.
 * Client-safe (pure metadata caching); the server resolver uses it as a defense-in-depth gate.
 */
export declare class RemoteOperationEngineBase extends BaseEngine<RemoteOperationEngineBase> {
    private _remoteOperations;
    private _byKey;
    /** The process-wide singleton. */
    static get Instance(): RemoteOperationEngineBase;
    /** Loads (or refreshes) the cached Remote Operation rows. */
    Config(forceRefresh?: boolean, contextUser?: UserInfo, provider?: IMetadataProvider): Promise<void>;
    /** All cached Remote Operation rows. */
    get RemoteOperations(): MJRemoteOperationEntity[];
    /** Case-insensitive lookup of an operation row by its `OperationKey` (`undefined` if there is no row). */
    GetOperationByKey(operationKey: string): MJRemoteOperationEntity | undefined;
    /**
     * Decides whether the operation key may be dispatched, from its metadata row. When there is NO row for the
     * key (a code-only operation), it is considered invokable — the in-code ClassFactory registration governs.
     * When a row exists it must be `Active`, and `AI`-generated ops must additionally be `Approved`.
     */
    IsInvokable(operationKey: string): RemoteOperationInvokabilityResult;
}
//# sourceMappingURL=RemoteOperationEngineBase.d.ts.map