import * as userSchema from '../security/user.ts';
import { type ServerOptions } from '../server/Server.ts';
import type { OperationFunctionName } from './serverHelpers/serverUtilities.ts';
import type { ParsedSqlObject } from '../sqlTranslator/index.js';
import { Resources } from '../resources/Resources.ts';
export { operationsServer as hdbServer };
export { operationsServer as start };
/**
 * Builds a Harper server.
 */
declare function operationsServer(options: ServerOptions & {
    resources?: Resources;
}): Promise<void>;
export interface ImpersonatePayload {
    username?: string;
    role?: {
        permission: Partial<userSchema.UserRoleNamedPermissions & userSchema.UserRoleDatabasePermissions>;
    };
    role_name?: string;
}
interface BaseOperationRequestBody {
    operation: OperationFunctionName;
    bypassAuth: boolean;
    hdb_user?: userSchema.User;
    hdbAuthHeader?: unknown;
    bypass_auth?: boolean;
    impersonate?: ImpersonatePayload;
    password?: string;
    payload?: string;
    sql?: string;
    parsedSqlObject?: ParsedSqlObject;
    [key: string]: unknown;
}
type SearchOperation = BaseOperationRequestBody;
interface SearchOperationRequestBody {
    search_operation: SearchOperation;
}
export type OperationRequestBody = BaseOperationRequestBody & Partial<SearchOperationRequestBody>;
export interface OperationRequest {
    body: OperationRequestBody;
}
export interface OperationResult {
    message?: any;
}
export declare function calculateRestHttpURL(httpPort: string | undefined, httpSecurePort: string | undefined, req: {
    hostname: string;
    protocol: string;
}): string;
