import { KeyValuePairInput } from "../generic/KeyValuePairInput.js";
import { AppContext } from "../types.js";
import { ResolverBase } from "../generic/ResolverBase.js";
/**
 * Input type for action parameters
 * Used to pass parameters to actions when invoking them
 */
export declare class ActionParamInput {
    /**
     * The name of the parameter
     */
    Name: string;
    /**
     * The value of the parameter
     * Complex objects should be serialized to JSON strings
     */
    Value: string;
    /**
     * The data type of the parameter
     * Used for type conversion on the server
     */
    Type: string;
}
/**
 * Input type for running an action
 */
export declare class RunActionInput {
    /**
     * The ID of the action to run
     */
    ActionID: string;
    /**
     * Parameters to pass to the action
     */
    Params?: ActionParamInput[];
    /**
     * Whether to skip logging the action execution
     * Defaults to false
     */
    SkipActionLog?: boolean;
}
/**
 * Represents a collection of key-value pairs that make up a composite key
 * Used for both primary keys and foreign keys
 */
export declare class CompositeKeyInput {
    /**
     * The collection of key-value pairs that make up the composite key
     */
    KeyValuePairs: KeyValuePairInput[];
}
/**
 * Input type for running entity actions
 */
export declare class EntityActionInput {
    /**
     * The ID of the entity action to run
     */
    EntityActionID: string;
    /**
     * The type of invocation (SingleRecord, View, List, etc.)
     */
    InvocationType: string;
    /**
     * The name of the entity
     * This is the preferred way to identify an entity as it's more human-readable than EntityID
     */
    EntityName?: string;
    /**
     * The ID of the entity
     * Use EntityName instead when possible for better code readability
     * @deprecated Use EntityName instead when possible
     */
    EntityID?: string;
    /**
     * The primary key of the entity record to act on
     * This is used for SingleRecord invocation types
     */
    PrimaryKey?: CompositeKeyInput;
    /**
     * The ID of the list to operate on
     * This is used for List invocation types
     */
    ListID?: string;
    /**
     * The ID of the view to operate on
     * This is used for View invocation types
     */
    ViewID?: string;
    /**
     * Additional parameters to pass to the action
     */
    Params?: ActionParamInput[];
}
/**
 * Output type for action results
 * Used to return results from actions to clients
 */
export declare class ActionResultOutput {
    /**
     * Whether the action was executed successfully
     */
    Success: boolean;
    /**
     * Optional message describing the result of the action
     */
    Message?: string;
    /**
     * Optional result code from the action
     */
    ResultCode?: string;
    /**
     * Optional result data from the action
     * Complex objects are serialized to JSON strings
     */
    ResultData?: string;
}
/**
 * Resolver for action-related GraphQL operations
 * Handles running actions and entity actions through GraphQL
 */
export declare class ActionResolver extends ResolverBase {
    /**
     * Mutation for running an action
     * @param input The input parameters for running the action
     * @param ctx The GraphQL context containing user authentication information
     * @returns The result of running the action
     */
    RunAction(input: RunActionInput, ctx: AppContext): Promise<ActionResultOutput>;
    /**
     * Finds an action by its ID
     * @param actionID The ID of the action to find
     * @returns The action
     * @throws Error if the action is not found
     * @private
     */
    private findActionById;
    /**
     * Parses action parameters from the input
     * @param inputParams The input parameters
     * @returns The parsed parameters
     * @private
     */
    private parseActionParameters;
    /**
     * Executes an action
     * @param action The action to execute
     * @param user The user context
     * @param params The action parameters
     * @param skipActionLog Whether to skip action logging
     * @returns The action result
     * @private
     */
    private executeAction;
    /**
     * Creates an action result from the execution result
     * @param result The execution result
     * @returns The formatted action result
     * @private
     */
    private createActionResult;
    /**
     * Handles errors in the action resolver
     * @param e The error
     * @returns An error result
     * @private
     */
    private handleActionError;
    /**
     * Mutation for running an entity action
     * @param input The input parameters for running the entity action
     * @param ctx The GraphQL context containing user authentication information
     * @returns The result of running the entity action
     */
    RunEntityAction(input: EntityActionInput, ctx: AppContext): Promise<ActionResultOutput>;
    /**
     * Gets an entity action by ID
     * @param actionID The ID of the entity action
     * @returns The entity action
     * @throws Error if entity action is not found
     * @private
     */
    private getEntityAction;
    /**
     * Creates the base parameters for the entity action
     * @param entityAction The entity action
     * @param invocationTypeName The invocation type name
     * @param user The authenticated user
     * @returns The base parameters
     * @private
     */
    private createBaseParams;
    /**
     * Adds the entity object to the parameters
     * @param params The parameters to add to
     * @param input The input parameters
     * @param user The authenticated user
     * @private
     */
    private addEntityObject;
    /**
     * Creates a composite key from the input
     * @param entity The entity information
     * @param primaryKey The primary key input
     * @returns The composite key
     * @private
     */
    private createCompositeKey;
    /**
     * Converts a value to the proper type based on the field information
     * @param value The value to convert
     * @param field The field information
     * @returns The converted value
     * @private
     */
    private convertValueToProperType;
    /**
     * Adds optional parameters to the entity action parameters
     * @param params The parameters to add to
     * @param input The input parameters
     * @private
     */
    private addOptionalParams;
    /**
     * Converts a parameter value to the proper format
     * @param p The parameter to convert
     * @returns The converted parameter
     * @private
     */
    private convertParameterValue;
    /**
     * Handles errors in the entity action resolver
     * @param e The error
     * @returns An error result
     * @private
     */
    private handleError;
}
//# sourceMappingURL=ActionResolver.d.ts.map