import { Repository, DataSource } from 'typeorm';
export declare class Proposal {
    id: string;
    tenantId: string;
    clientId: string;
    createdBy: string;
    number: string;
    title: string;
    validUntil: string;
    sentAt: Date;
    viewedAt: Date;
    acceptedAt: Date;
    rejectedAt: Date;
    subtotal: number;
    discount: number;
    total: number;
    acceptIp: string;
    acceptUserAgent: string;
    notes: string;
    internalNotes: string;
    billingCycle: string;
    paymentTerms: string;
    installmentsCount: number;
    installmentAmount: number;
    firstDueDate: string;
    status: string;
    items: ProposalItem[];
    createdAt: Date;
    updatedAt: Date;
}
export declare class ProposalItem {
    id: string;
    proposalId: string;
    tenantId: string;
    productId: string;
    productVariantId: string;
    name: string;
    description: string;
    billingCycle: string;
    unitPrice: number;
    quantity: number;
    discount: number;
    total: number;
    serviceListItem: string;
    issAliquota: number;
    discrimination: string;
    billingType: string;
    includedQty: number;
    measurementUnit: string;
    excessPricing: string;
    sortOrder: number;
    proposal: Proposal;
    createdAt: Date;
}
export declare class ProposalItemDto {
    productId?: string;
    productVariantId?: string;
    name: string;
    description?: string;
    billingCycle?: string;
    unitPrice: number;
    quantity?: number;
    discount?: number;
    serviceListItem?: string;
    issAliquota?: number;
    discrimination?: string;
    billingType?: string;
    includedQty?: number;
    measurementUnit?: string;
    excessPricing?: string;
    sortOrder?: number;
}
export declare class CreateProposalDto {
    clientId: string;
    title?: string;
    validUntil?: string;
    notes?: string;
    internalNotes?: string;
    billingCycle?: string;
    paymentTerms?: string;
    installmentsCount?: number;
    installmentAmount?: number;
    firstDueDate?: string;
    items: ProposalItemDto[];
}
export declare class AcceptProposalDto {
    token?: string;
}
export declare class ProposalsService {
    private readonly proposalRepo;
    private readonly itemRepo;
    private readonly dataSource;
    private readonly logger;
    constructor(proposalRepo: Repository<Proposal>, itemRepo: Repository<ProposalItem>, dataSource: DataSource);
    private nextNumber;
    private calcTotals;
    create(tenantId: string, userId: string, dto: CreateProposalDto): Promise<Proposal>;
    findAll(tenantId: string, status?: string, clientId?: string): Promise<Proposal[]>;
    findOne(tenantId: string, id: string): Promise<Proposal>;
    send(tenantId: string, id: string): Promise<Proposal>;
    registerView(tenantId: string, id: string): Promise<void>;
    getPublic(tenantId: string, id: string): Promise<any>;
    private autoCreateContract;
    accept(tenantId: string, id: string, ip: string, userAgent: string): Promise<Proposal>;
    reject(tenantId: string, id: string): Promise<Proposal>;
}
export declare class ProposalsController {
    private readonly proposalsService;
    constructor(proposalsService: ProposalsService);
    create(dto: CreateProposalDto, req: any): Promise<Proposal>;
    findAll(req: any, status?: string, clientId?: string): Promise<Proposal[]>;
    findOne(id: string, req: any): Promise<Proposal>;
    send(id: string, req: any): Promise<Proposal>;
    reject(id: string, req: any): Promise<Proposal>;
    getPublic(tenantId: string, id: string): Promise<any>;
    accept(tenantId: string, id: string, ip: string, userAgent: string): Promise<Proposal>;
    view(tenantId: string, id: string): Promise<void>;
}
export declare class ProposalsModule {
}
