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; ai_confidence?: number; ai_suggestions?: Record; template_id?: string; recurring_schedule_id?: string; extraction_result_id?: string; billing_address?: Record; shipping_address?: Record; [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; subtotal?: number; tax_total?: number; total?: number; amount_paid?: number; amount_due?: number; billing_address?: Record; shipping_address?: Record; [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; [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; [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; provider?: string; [key: string]: unknown; }; export type CreateTemplateAttributes = { workspace_id: string; name: string; description?: string; layout?: Record; default_payment_terms?: string; default_notes?: string; branding?: Record; is_default?: boolean; metadata?: Record; [key: string]: unknown; }; export type UpdateTemplateAttributes = { name?: string; description?: string; layout?: Record; default_payment_terms?: string; default_notes?: string; branding?: Record; is_default?: boolean; metadata?: Record; [key: string]: unknown; }; export type CreateRuleAttributes = { workspace_id: string; name: string; rule_type?: string; source?: string; conditions?: Record; actions?: Record; confidence?: number; active?: boolean; metadata?: Record; [key: string]: unknown; }; export type UpdateRuleAttributes = { name?: string; conditions?: Record; actions?: Record; confidence?: number; active?: boolean; metadata?: Record; [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[]; auto_send?: boolean; active?: boolean; metadata?: Record; [key: string]: unknown; }; export type UpdateRecurringScheduleAttributes = { name?: string; contact_id?: string; template_id?: string; frequency?: string; end_date?: string; line_items?: Record[]; auto_send?: boolean; metadata?: Record; [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; [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; [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; [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; [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; /** List invoices by workspace. */ listByWorkspace: (workspaceId: string, options?: { page?: number; pageSize?: number; } & RequestOptions) => Promise; /** Create an invoice. */ create: (attributes: CreateInvoiceAttributes, options?: RequestOptions) => Promise; /** Update an invoice. */ update: (id: string, attributes: UpdateInvoiceAttributes, options?: RequestOptions) => Promise; /** Delete an invoice. */ delete: (id: string, options?: RequestOptions) => Promise; /** Submit an invoice for approval. */ submitForApproval: (id: string, options?: RequestOptions) => Promise; /** Approve an invoice. */ approve: (id: string, options?: RequestOptions) => Promise; /** Send an invoice. */ send: (id: string, options?: RequestOptions) => Promise; /** Mark an invoice as viewed. */ markViewed: (id: string, options?: RequestOptions) => Promise; /** Void an invoice. */ void: (id: string, voidedReason: string, options?: RequestOptions) => Promise; /** Mark an invoice as overdue. */ markOverdue: (id: string, options?: RequestOptions) => Promise; /** Dispute an invoice. */ dispute: (id: string, options?: RequestOptions) => Promise; /** Resolve a dispute on an invoice. */ resolveDispute: (id: string, options?: RequestOptions) => Promise; /** Schedule a payment for an invoice. */ schedulePayment: (id: string, options?: RequestOptions) => Promise; /** Mark an invoice as paid. */ markPaid: (id: string, options?: RequestOptions) => Promise; /** Apply AI suggestions to an invoice. */ applyAiSuggestions: (id: string, acceptedKeys: string[], options?: RequestOptions) => Promise; }; lines: { /** Get a line item by ID. */ get: (id: string, options?: RequestOptions) => Promise; /** Create a line item. */ create: (attributes: CreateInvoiceLineAttributes, options?: RequestOptions) => Promise; /** Update a line item. */ update: (id: string, attributes: UpdateInvoiceLineAttributes, options?: RequestOptions) => Promise; /** Delete a line item. */ delete: (id: string, options?: RequestOptions) => Promise; }; payments: { /** Get a payment by ID. */ get: (id: string, options?: RequestOptions) => Promise; /** Record a payment against an invoice. */ create: (attributes: CreatePaymentAttributes, options?: RequestOptions) => Promise; /** Delete a payment. */ delete: (id: string, options?: RequestOptions) => Promise; }; templates: { /** Get a template by ID. */ get: (id: string, options?: RequestOptions) => Promise; /** Create a template. */ create: (attributes: CreateTemplateAttributes, options?: RequestOptions) => Promise; /** Update a template. */ update: (id: string, attributes: UpdateTemplateAttributes, options?: RequestOptions) => Promise; /** Delete a template. */ delete: (id: string, options?: RequestOptions) => Promise; }; rules: { /** Get a rule by ID. */ get: (id: string, options?: RequestOptions) => Promise; /** Create a rule. */ create: (attributes: CreateRuleAttributes, options?: RequestOptions) => Promise; /** Update a rule. */ update: (id: string, attributes: UpdateRuleAttributes, options?: RequestOptions) => Promise; /** Delete a rule. */ delete: (id: string, options?: RequestOptions) => Promise; /** Deactivate a rule. */ deactivate: (id: string, options?: RequestOptions) => Promise; }; recurringSchedules: { /** Get a recurring schedule by ID. */ get: (id: string, options?: RequestOptions) => Promise; /** Create a recurring schedule. */ create: (attributes: CreateRecurringScheduleAttributes, options?: RequestOptions) => Promise; /** Update a recurring schedule. */ update: (id: string, attributes: UpdateRecurringScheduleAttributes, options?: RequestOptions) => Promise; /** Delete a recurring schedule. */ delete: (id: string, options?: RequestOptions) => Promise; /** Pause a recurring schedule. */ pause: (id: string, options?: RequestOptions) => Promise; /** Resume a recurring schedule. */ resume: (id: string, options?: RequestOptions) => Promise; }; contacts: { /** Get an invoices contact by ID. */ get: (id: string, options?: RequestOptions) => Promise; /** List invoices contacts by workspace. */ listByWorkspace: (workspaceId: string, options?: { page?: number; pageSize?: number; } & RequestOptions) => Promise; /** Create an invoices contact. */ create: (attributes: CreateContactAttributes, options?: RequestOptions) => Promise; /** Update an invoices contact. */ update: (id: string, attributes: UpdateContactAttributes, options?: RequestOptions) => Promise; /** Delete an invoices contact. */ delete: (id: string, options?: RequestOptions) => Promise; }; quoteRequests: { /** Get a quote request by ID. */ get: (id: string, options?: RequestOptions) => Promise; /** List quote requests in a workspace. */ listByWorkspace: (workspaceId: string, options?: { page?: number; pageSize?: number; } & RequestOptions) => Promise; /** Create a quote request directly via the admin API. */ create: (attributes: CreateQuoteRequestAttributes, options?: RequestOptions) => Promise; /** Update a quote request (PATCH semantics). */ update: (id: string, attributes: UpdateQuoteRequestAttributes, options?: RequestOptions) => Promise; /** Permanently delete a quote request. */ delete: (id: string, options?: RequestOptions) => Promise; }; activities: { /** Get an activity by ID. */ get: (id: string, options?: RequestOptions) => Promise; }; }; //# sourceMappingURL=invoices.d.ts.map