import { getDb } from '../../../database';
export declare function applicationNameFromSecurityConfig(config: unknown): string | undefined;
/**
 * Collects unique (projectId, application name) pairs from rows, loads matching
 * `applications` rows in one query, returns map key `${projectId}::${name}` → application id.
 */
export declare function buildLinkedApplicationIdMap(db: ReturnType<typeof getDb>, rows: ReadonlyArray<{
    projectId: string | null;
    config: unknown;
}>): Promise<Map<string, string>>;
export declare function linkedApplicationIdFromMap(map: Map<string, string>, projectId: string | null, config: unknown): string | undefined;
/** True if `applicationDefinition` has at least one non-empty string field. */
export declare function applicationDefinitionHasNonEmptyValues(applicationDefinition: unknown): boolean;
/**
 * Resolves the linked application id from `config.target.label` by matching
 * `applications.name` in the same project (same rules as `buildLinkedApplicationIdMap`).
 */
export declare function resolveApplicationIdFromSecurityConfig(db: ReturnType<typeof getDb>, projectId: string, cfg: unknown): Promise<string | undefined>;
export interface SecurityConfigInput {
    name: string;
    status: number;
    config: any;
    projectId: string;
    applicationId?: string;
    orgId: string;
}
export interface SecurityConfigUpdateInput {
    id: string;
    name?: string;
    status?: number;
    config?: any;
    projectId?: string;
    applicationId?: string;
}
export interface SecurityConfig {
    id: string;
    name: string;
    status: number;
    config: any;
    projectId: string | null;
    applicationId?: string;
    is_archived: boolean;
    createdAt: Date;
    updatedAt: Date;
}
export declare function createSecurityConfig(input: SecurityConfigInput): Promise<{
    id: string;
}>;
export declare function updateSecurityConfig(input: SecurityConfigUpdateInput): Promise<{
    message: string;
}>;
export declare function getSecurityConfigByIdOrName(params: {
    id?: string;
    name?: string;
    projectId: string;
}): Promise<Omit<SecurityConfig, 'applicationId'> & {
    testRunIds: any[];
    applicationId: string | null;
}>;
export declare function getAllSecurityConfigs(projectId?: string, page?: number, limit?: number, archived_data_required?: string, excludeCustomProviders?: boolean, search?: string): Promise<{
    data: any[];
    pagination?: any;
} | any[]>;
export declare function deleteSecurityConfig(id: string): Promise<{
    message: string;
}>;
export declare function archiveSecurityConfig(id: string): Promise<{
    message: string;
}>;
//# sourceMappingURL=security-config.d.ts.map