import type { InvoicesInvoice, InvoicesLine, InvoicesPayment, InvoicesTemplate, InvoicesRule, InvoicesRecurringSchedule, InvoicesContact, InvoicesActivity, InvoicesQuoteRequest } from "../_internal/types.gen";
import type { RequestOptions } from "../base-client";
import { RequestBuilder } from "../request-builder";
export type CreateInvoiceAttributes = {
    workspace_id: string;
    direction?: string;
    source?: string;
    reference_number?: string;
    contact_id?: string;
    issue_date?: string;
    due_date?: string;
    currency?: string;
    subtotal?: number;
    tax_total?: number;
    total?: number;
    amount_paid?: number;
    amount_due?: number;
    payment_terms?: string;
    notes?: string;
    metadata?: Record<string, unknown>;
    ai_confidence?: number;
    ai_suggestions?: Record<string, unknown>;
    template_id?: string;
    recurring_schedule_id?: string;
    extraction_result_id?: string;
    billing_address?: Record<string, unknown>;
    shipping_address?: Record<string, unknown>;
    [key: string]: unknown;
};
export type UpdateInvoiceAttributes = {
    reference_number?: string;
    contact_id?: string;
    issue_date?: string;
    due_date?: string;
    currency?: string;
    payment_terms?: string;
    notes?: string;
    metadata?: Record<string, unknown>;
    subtotal?: number;
    tax_total?: number;
    total?: number;
    amount_paid?: number;
    amount_due?: number;
    billing_address?: Record<string, unknown>;
    shipping_address?: Record<string, unknown>;
    [key: string]: unknown;
};
export type CreateInvoiceLineAttributes = {
    invoice_id: string;
    position?: number;
    description?: string;
    quantity?: number;
    unit_price?: number;
    tax_rate?: number;
    gl_code?: string;
    category?: string;
    ai_suggested_gl?: string;
    ai_gl_confidence?: number;
    metadata?: Record<string, unknown>;
    [key: string]: unknown;
};
export type UpdateInvoiceLineAttributes = {
    position?: number;
    description?: string;
    quantity?: number;
    unit_price?: number;
    tax_rate?: number;
    gl_code?: string;
    category?: string;
    ai_suggested_gl?: string;
    ai_gl_confidence?: number;
    metadata?: Record<string, unknown>;
    [key: string]: unknown;
};
export type CreatePaymentAttributes = {
    invoice_id: string;
    amount: number;
    currency?: string;
    method?: string;
    reference?: string;
    provider_transaction_id?: string;
    paid_at?: string;
    notes?: string;
    metadata?: Record<string, unknown>;
    provider?: string;
    [key: string]: unknown;
};
export type CreateTemplateAttributes = {
    workspace_id: string;
    name: string;
    description?: string;
    layout?: Record<string, unknown>;
    default_payment_terms?: string;
    default_notes?: string;
    branding?: Record<string, unknown>;
    is_default?: boolean;
    metadata?: Record<string, unknown>;
    [key: string]: unknown;
};
export type UpdateTemplateAttributes = {
    name?: string;
    description?: string;
    layout?: Record<string, unknown>;
    default_payment_terms?: string;
    default_notes?: string;
    branding?: Record<string, unknown>;
    is_default?: boolean;
    metadata?: Record<string, unknown>;
    [key: string]: unknown;
};
export type CreateRuleAttributes = {
    workspace_id: string;
    name: string;
    rule_type?: string;
    source?: string;
    conditions?: Record<string, unknown>;
    actions?: Record<string, unknown>;
    confidence?: number;
    active?: boolean;
    metadata?: Record<string, unknown>;
    [key: string]: unknown;
};
export type UpdateRuleAttributes = {
    name?: string;
    conditions?: Record<string, unknown>;
    actions?: Record<string, unknown>;
    confidence?: number;
    active?: boolean;
    metadata?: Record<string, unknown>;
    [key: string]: unknown;
};
export type CreateRecurringScheduleAttributes = {
    workspace_id: string;
    contact_id?: string;
    template_id?: string;
    name: string;
    frequency?: string;
    start_date?: string;
    end_date?: string;
    next_run_date?: string;
    line_items?: Record<string, unknown>[];
    auto_send?: boolean;
    active?: boolean;
    metadata?: Record<string, unknown>;
    [key: string]: unknown;
};
export type UpdateRecurringScheduleAttributes = {
    name?: string;
    contact_id?: string;
    template_id?: string;
    frequency?: string;
    end_date?: string;
    line_items?: Record<string, unknown>[];
    auto_send?: boolean;
    metadata?: Record<string, unknown>;
    [key: string]: unknown;
};
export type CreateContactAttributes = {
    workspace_id: string;
    name: string;
    email?: string;
    phone?: string;
    tax_id?: string;
    type?: string;
    payment_terms_default?: string;
    notes?: string;
    metadata?: Record<string, unknown>;
    [key: string]: unknown;
};
export type UpdateContactAttributes = {
    name?: string;
    email?: string;
    phone?: string;
    tax_id?: string;
    type?: string;
    payment_terms_default?: string;
    notes?: string;
    metadata?: Record<string, unknown>;
    [key: string]: unknown;
};
/** A single line item on a quote request. */
export type QuoteRequestLineItem = {
    description?: string | null;
    quantity?: number | null;
    unit_price?: string | null;
    currency?: string | null;
    [key: string]: unknown;
};
/** Attributes accepted when creating a quote request via the admin API. */
export type CreateQuoteRequestAttributes = {
    workspace_id: string;
    submitted_via_form_id?: string | null;
    submitted_via_submission_id?: string | null;
    requester_contact_id?: string | null;
    requester_email?: string | null;
    requester_name?: string | null;
    line_items?: QuoteRequestLineItem[];
    notes?: string | null;
    status?: "received" | "under_review" | "quoted" | "rejected" | "accepted" | "expired";
    expires_at?: string | null;
    metadata?: Record<string, unknown>;
    [key: string]: unknown;
};
/** Attributes accepted when updating a quote request via the admin API (PATCH semantics). */
export type UpdateQuoteRequestAttributes = {
    requester_contact_id?: string | null;
    requester_email?: string | null;
    requester_name?: string | null;
    line_items?: QuoteRequestLineItem[];
    notes?: string | null;
    status?: "received" | "under_review" | "quoted" | "rejected" | "accepted" | "expired";
    expires_at?: string | null;
    metadata?: Record<string, unknown>;
    [key: string]: unknown;
};
export type { InvoicesInvoice, InvoicesLine, InvoicesPayment, InvoicesTemplate, InvoicesRule, InvoicesRecurringSchedule, InvoicesContact, InvoicesActivity, InvoicesQuoteRequest, };
export declare function createInvoicesNamespace(rb: RequestBuilder): {
    invoices: {
        /** Get an invoice by ID. */
        get: (id: string, options?: RequestOptions) => Promise<InvoicesInvoice>;
        /** List invoices by workspace. */
        listByWorkspace: (workspaceId: string, options?: {
            page?: number;
            pageSize?: number;
        } & RequestOptions) => Promise<InvoicesInvoice[]>;
        /** Create an invoice. */
        create: (attributes: CreateInvoiceAttributes, options?: RequestOptions) => Promise<InvoicesInvoice>;
        /** Update an invoice. */
        update: (id: string, attributes: UpdateInvoiceAttributes, options?: RequestOptions) => Promise<InvoicesInvoice>;
        /** Delete an invoice. */
        delete: (id: string, options?: RequestOptions) => Promise<true>;
        /** Submit an invoice for approval. */
        submitForApproval: (id: string, options?: RequestOptions) => Promise<InvoicesInvoice>;
        /** Approve an invoice. */
        approve: (id: string, options?: RequestOptions) => Promise<InvoicesInvoice>;
        /** Send an invoice. */
        send: (id: string, options?: RequestOptions) => Promise<InvoicesInvoice>;
        /** Mark an invoice as viewed. */
        markViewed: (id: string, options?: RequestOptions) => Promise<InvoicesInvoice>;
        /** Void an invoice. */
        void: (id: string, voidedReason: string, options?: RequestOptions) => Promise<InvoicesInvoice>;
        /** Mark an invoice as overdue. */
        markOverdue: (id: string, options?: RequestOptions) => Promise<InvoicesInvoice>;
        /** Dispute an invoice. */
        dispute: (id: string, options?: RequestOptions) => Promise<InvoicesInvoice>;
        /** Resolve a dispute on an invoice. */
        resolveDispute: (id: string, options?: RequestOptions) => Promise<InvoicesInvoice>;
        /** Schedule a payment for an invoice. */
        schedulePayment: (id: string, options?: RequestOptions) => Promise<InvoicesInvoice>;
        /** Mark an invoice as paid. */
        markPaid: (id: string, options?: RequestOptions) => Promise<InvoicesInvoice>;
        /** Apply AI suggestions to an invoice. */
        applyAiSuggestions: (id: string, acceptedKeys: string[], options?: RequestOptions) => Promise<InvoicesInvoice>;
    };
    lines: {
        /** Get a line item by ID. */
        get: (id: string, options?: RequestOptions) => Promise<InvoicesLine>;
        /** Create a line item. */
        create: (attributes: CreateInvoiceLineAttributes, options?: RequestOptions) => Promise<InvoicesLine>;
        /** Update a line item. */
        update: (id: string, attributes: UpdateInvoiceLineAttributes, options?: RequestOptions) => Promise<InvoicesLine>;
        /** Delete a line item. */
        delete: (id: string, options?: RequestOptions) => Promise<true>;
    };
    payments: {
        /** Get a payment by ID. */
        get: (id: string, options?: RequestOptions) => Promise<InvoicesPayment>;
        /** Record a payment against an invoice. */
        create: (attributes: CreatePaymentAttributes, options?: RequestOptions) => Promise<InvoicesPayment>;
        /** Delete a payment. */
        delete: (id: string, options?: RequestOptions) => Promise<true>;
    };
    templates: {
        /** Get a template by ID. */
        get: (id: string, options?: RequestOptions) => Promise<InvoicesTemplate>;
        /** Create a template. */
        create: (attributes: CreateTemplateAttributes, options?: RequestOptions) => Promise<InvoicesTemplate>;
        /** Update a template. */
        update: (id: string, attributes: UpdateTemplateAttributes, options?: RequestOptions) => Promise<InvoicesTemplate>;
        /** Delete a template. */
        delete: (id: string, options?: RequestOptions) => Promise<true>;
    };
    rules: {
        /** Get a rule by ID. */
        get: (id: string, options?: RequestOptions) => Promise<InvoicesRule>;
        /** Create a rule. */
        create: (attributes: CreateRuleAttributes, options?: RequestOptions) => Promise<InvoicesRule>;
        /** Update a rule. */
        update: (id: string, attributes: UpdateRuleAttributes, options?: RequestOptions) => Promise<InvoicesRule>;
        /** Delete a rule. */
        delete: (id: string, options?: RequestOptions) => Promise<true>;
        /** Deactivate a rule. */
        deactivate: (id: string, options?: RequestOptions) => Promise<InvoicesRule>;
    };
    recurringSchedules: {
        /** Get a recurring schedule by ID. */
        get: (id: string, options?: RequestOptions) => Promise<InvoicesRecurringSchedule>;
        /** Create a recurring schedule. */
        create: (attributes: CreateRecurringScheduleAttributes, options?: RequestOptions) => Promise<InvoicesRecurringSchedule>;
        /** Update a recurring schedule. */
        update: (id: string, attributes: UpdateRecurringScheduleAttributes, options?: RequestOptions) => Promise<InvoicesRecurringSchedule>;
        /** Delete a recurring schedule. */
        delete: (id: string, options?: RequestOptions) => Promise<true>;
        /** Pause a recurring schedule. */
        pause: (id: string, options?: RequestOptions) => Promise<InvoicesRecurringSchedule>;
        /** Resume a recurring schedule. */
        resume: (id: string, options?: RequestOptions) => Promise<InvoicesRecurringSchedule>;
    };
    contacts: {
        /** Get an invoices contact by ID. */
        get: (id: string, options?: RequestOptions) => Promise<InvoicesContact>;
        /** List invoices contacts by workspace. */
        listByWorkspace: (workspaceId: string, options?: {
            page?: number;
            pageSize?: number;
        } & RequestOptions) => Promise<InvoicesContact[]>;
        /** Create an invoices contact. */
        create: (attributes: CreateContactAttributes, options?: RequestOptions) => Promise<InvoicesContact>;
        /** Update an invoices contact. */
        update: (id: string, attributes: UpdateContactAttributes, options?: RequestOptions) => Promise<InvoicesContact>;
        /** Delete an invoices contact. */
        delete: (id: string, options?: RequestOptions) => Promise<true>;
    };
    quoteRequests: {
        /** Get a quote request by ID. */
        get: (id: string, options?: RequestOptions) => Promise<InvoicesQuoteRequest>;
        /** List quote requests in a workspace. */
        listByWorkspace: (workspaceId: string, options?: {
            page?: number;
            pageSize?: number;
        } & RequestOptions) => Promise<InvoicesQuoteRequest[]>;
        /** Create a quote request directly via the admin API. */
        create: (attributes: CreateQuoteRequestAttributes, options?: RequestOptions) => Promise<InvoicesQuoteRequest>;
        /** Update a quote request (PATCH semantics). */
        update: (id: string, attributes: UpdateQuoteRequestAttributes, options?: RequestOptions) => Promise<InvoicesQuoteRequest>;
        /** Permanently delete a quote request. */
        delete: (id: string, options?: RequestOptions) => Promise<true>;
    };
    activities: {
        /** Get an activity by ID. */
        get: (id: string, options?: RequestOptions) => Promise<InvoicesActivity>;
    };
};
//# sourceMappingURL=invoices.d.ts.map