import { type SQL } from 'drizzle-orm';
import type { Db } from './db.js';
/**
 * Catalog quality checks. One SQL predicate per issue type, evaluated against products resolved
 * for a store view (store-view values, falling back to the default scope). Shared by the Catalog API
 * today and by feeds/reporting later, so every consumer agrees on what "missing images" means.
 */
export declare const QUALITY_CHECKS: {
    missing_images: {
        label: string;
        where: SQL<unknown>;
    };
    missing_description: {
        label: string;
        where: SQL<unknown>;
    };
    missing_required_attributes: {
        label: string;
        where: SQL<unknown>;
    };
    no_category: {
        label: string;
        where: SQL<unknown>;
    };
    invalid_price: {
        label: string;
        where: SQL<unknown>;
    };
    enabled_not_visible: {
        label: string;
        where: SQL<unknown>;
    };
    not_in_website: {
        label: string;
        where: SQL<unknown>;
    };
    out_of_stock_enabled: {
        label: string;
        where: SQL<unknown>;
    };
    configurable_without_children: {
        label: string;
        where: SQL<unknown>;
    };
};
export type QualityIssueType = keyof typeof QUALITY_CHECKS;
export declare const QUALITY_ISSUE_TYPES: QualityIssueType[];
/** Checks that only make sense when stock is managed in Magento. */
export declare const STOCK_ISSUE_TYPES: QualityIssueType[];
export declare function qualityIssueTypes(opts: {
    stock: boolean;
}): QualityIssueType[];
export declare function qualitySummary(db: Db, storeId: number, types?: QualityIssueType[]): Promise<{
    totalProducts: number;
    issues: {
        type: "missing_images" | "missing_description" | "missing_required_attributes" | "no_category" | "invalid_price" | "enabled_not_visible" | "not_in_website" | "out_of_stock_enabled" | "configurable_without_children";
        label: string;
        count: number;
    }[];
}>;
export type QualityIssueRow = {
    sku: string;
    name: string;
    type_id: string;
    status: number;
    visibility: number;
    missing_required: string[];
};
export declare function qualityIssues(db: Db, type: QualityIssueType, storeId: number, limit: number, offset: number): Promise<{
    type: "missing_images" | "missing_description" | "missing_required_attributes" | "no_category" | "invalid_price" | "enabled_not_visible" | "not_in_website" | "out_of_stock_enabled" | "configurable_without_children";
    label: string;
    total: number;
    items: QualityIssueRow[];
}>;
//# sourceMappingURL=quality.d.ts.map