export type RepairIncidentStatus = "open" | "sent" | "received" | "diagnosing" | "awaiting_parts" | "repaired" | "replaced" | "rejected" | "closed";
export interface ProductMediaRow {
    id: number;
    user_id: number;
    product_id: number;
    kind: string;
    file_url: string;
    file_name: string;
    mime_type: string;
    caption: string;
    sort_order: number;
    created_at: string;
}
export interface RepairIncidentRow {
    id: number;
    user_id: number;
    product_id: number;
    purchase_document_line_id: number | null;
    incident_number: string;
    title: string;
    incident_type: string;
    status: RepairIncidentStatus;
    detected_at: string;
    delivered_at: string | null;
    delivery_place: string;
    received_by: string;
    description: string;
    symptom: string;
    accessories: string;
    sat_name: string;
    sat_reference: string;
    diagnosis: string;
    technician_notes: string;
    estimated_cost: string | null;
    resolution: string;
    replaced_with_new: boolean;
    replaced_with_refurbished: boolean;
    user_rating: number | null;
    user_rating_notes: string;
    closed_at: string | null;
    created_at: string;
    updated_at: string;
}
export interface RepairIncidentListItem extends RepairIncidentRow {
    product_name: string;
    product_brand: string;
    product_model: string;
    product_category: string;
    product_status: string;
    product_days_remaining: number;
    attachment_count: number;
    media_count: number;
}
export interface RepairIncidentStats {
    total: number;
    open: number;
    resolved: number;
    closed: number;
    avg_rating: number | null;
    top_brands: Array<{
        label: string;
        count: number;
    }>;
    top_models: Array<{
        label: string;
        count: number;
    }>;
    top_products: Array<{
        label: string;
        count: number;
    }>;
}
export interface IncidentAttachmentRow {
    id: number;
    user_id: number;
    incident_id: number;
    kind: string;
    file_url: string;
    file_name: string;
    mime_type: string;
    caption: string;
    sort_order: number;
    created_at: string;
}
export declare function assertOwnedProduct(userId: number, productId: number): Promise<void>;
export declare function listProductMedia(userId: number, productId: number): Promise<ProductMediaRow[]>;
export declare function addProductMedia(userId: number, productId: number, items: Array<{
    fileUrl: string;
    fileName: string;
    mimeType: string;
    kind: string;
    caption?: string;
    sortOrder?: number;
}>): Promise<ProductMediaRow[]>;
export declare function deleteProductMedia(userId: number, productId: number, mediaId: number): Promise<boolean>;
export declare function listIncidents(userId: number): Promise<RepairIncidentListItem[]>;
export declare function getIncidentStats(userId: number): Promise<RepairIncidentStats>;
export declare function getIncident(userId: number, id: number): Promise<{
    incident: RepairIncidentRow;
    product: {
        id: number;
        name: string;
        brand: string;
        model: string;
        category: string;
        status: string;
        days_remaining: number;
        effective_end_date: string;
    };
    attachments: IncidentAttachmentRow[];
    media: ProductMediaRow[];
} | null>;
export interface CreateIncidentInput {
    userId: number;
    productId: number;
    purchaseDocumentLineId?: number | null;
    title: string;
    incidentType: string;
    detectedAt: string;
    deliveryPlace: string;
    receivedBy: string;
    description: string;
    symptom: string;
    accessories: string;
    satName: string;
    satReference: string;
    diagnosis: string;
    technicianNotes: string;
    estimatedCost: number | null;
    resolution: string;
    replacedWithNew: boolean;
    replacedWithRefurbished: boolean;
    userRating: number | null;
    userRatingNotes: string;
    sharePublicRating: boolean;
}
export declare function createIncident(input: CreateIncidentInput): Promise<RepairIncidentRow>;
export interface UpdateIncidentInput {
    title?: string;
    incidentType?: string;
    status?: RepairIncidentStatus;
    detectedAt?: string;
    deliveredAt?: string | null;
    deliveryPlace?: string;
    receivedBy?: string;
    description?: string;
    symptom?: string;
    accessories?: string;
    satName?: string;
    satReference?: string;
    diagnosis?: string;
    technicianNotes?: string;
    estimatedCost?: number | null;
    resolution?: string;
    replacedWithNew?: boolean;
    replacedWithRefurbished?: boolean;
    userRating?: number | null;
    userRatingNotes?: string;
    sharePublicRating?: boolean;
    closedAt?: string | null;
}
export declare function updateIncident(userId: number, id: number, input: UpdateIncidentInput): Promise<RepairIncidentRow | null>;
export declare function addIncidentAttachments(userId: number, incidentId: number, items: Array<{
    fileUrl: string;
    fileName: string;
    mimeType: string;
    kind: string;
    caption?: string;
    sortOrder?: number;
}>): Promise<IncidentAttachmentRow[]>;
export declare function deleteIncidentAttachment(userId: number, incidentId: number, attachmentId: number): Promise<boolean>;
//# sourceMappingURL=repairs.service.d.ts.map