Quotes
Quote creation, conversion, and approval workflows.
externalpermissionstable12 procedures
query
quotes.listInferred outputList quotes for the organization with optional filters.
Input
{
status?: "draft" | "rejected" | "sent" | "accepted" | "expired" | "converted" | undefined;
rootTaskId?: string | undefined;
limit?: number | undefined;
offset?: number | undefined;
contactId?: string | undefined;
issuedAfter?: string | undefined;
issuedBefore?: string | undefined;
}Output
QuoteListResultquery
quotes.getByIdInferred outputGet a single quote by ID with optional lines.
Input
{
id: string;
includeLines?: boolean | undefined;
}Output
{
id: string;
status: "draft" | "rejected" | "sent" | "accepted" | "expired" | "converted" | null;
organizationId: string;
rootTaskId: string | null;
name: string | null;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
notes: string | null;
contactId: string;
currency: string | null;
lastSyncedAt: Date | null;
issuedDate: string | null;
subtotal: string | null;
tax: string | null;
total: string | null;
terms: string | null;
accountingSyncStatus: "not_synced" | "synced" | "modified" | "sync_failed" | "syncing" | null;
accountingSystemId: "xero" | "quickbooks" | "myob" | null;
lastSyncError: string | null;
syncedVersionHash: string | null;
quoteNumber: string;
validUntil: string | null;
convertedToTaskId: string | null;
convertedAt: Date | null;
pdfUrl: string | null;
pdfKey: string | null;
pdfGeneratedAt: Date | null;
accountingSystemQuoteId: string | null;
} | QuoteWithLines | nullmutation
quotes.createInferred outputCreate a new quote. If quoteNumber is not provided, will auto-generate.
Input
{
contactId: string;
status?: "draft" | "rejected" | "sent" | "accepted" | "expired" | "converted" | undefined;
rootTaskId?: string | undefined;
name?: string | undefined;
notes?: string | undefined;
currency?: string | undefined;
issuedDate?: string | undefined;
subtotal?: number | undefined;
tax?: number | undefined;
total?: number | undefined;
terms?: string | undefined;
quoteNumber?: string | undefined;
validUntil?: string | undefined;
}Output
{
id: string;
status: "draft" | "rejected" | "sent" | "accepted" | "expired" | "converted" | null;
organizationId: string;
rootTaskId: string | null;
name: string | null;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
notes: string | null;
contactId: string;
currency: string | null;
lastSyncedAt: Date | null;
issuedDate: string | null;
subtotal: string | null;
tax: string | null;
total: string | null;
terms: string | null;
accountingSyncStatus: "not_synced" | "synced" | "modified" | "sync_failed" | "syncing" | null;
accountingSystemId: "xero" | "quickbooks" | "myob" | null;
lastSyncError: string | null;
syncedVersionHash: string | null;
quoteNumber: string;
validUntil: string | null;
convertedToTaskId: string | null;
convertedAt: Date | null;
pdfUrl: string | null;
pdfKey: string | null;
pdfGeneratedAt: Date | null;
accountingSystemQuoteId: string | null;
}mutation
quotes.updateInferred outputUpdate a quote.
Input
{
id: string;
status?: "draft" | "rejected" | "sent" | "accepted" | "expired" | "converted" | undefined;
rootTaskId?: string | null | undefined;
name?: string | null | undefined;
notes?: string | null | undefined;
contactId?: string | undefined;
currency?: string | undefined;
issuedDate?: string | null | undefined;
subtotal?: number | undefined;
tax?: number | undefined;
total?: number | undefined;
terms?: string | null | undefined;
quoteNumber?: string | undefined;
validUntil?: string | null | undefined;
}Output
{
id: string;
status: "draft" | "rejected" | "sent" | "accepted" | "expired" | "converted" | null;
organizationId: string;
rootTaskId: string | null;
name: string | null;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
notes: string | null;
contactId: string;
currency: string | null;
lastSyncedAt: Date | null;
issuedDate: string | null;
subtotal: string | null;
tax: string | null;
total: string | null;
terms: string | null;
accountingSyncStatus: "not_synced" | "synced" | "modified" | "sync_failed" | "syncing" | null;
accountingSystemId: "xero" | "quickbooks" | "myob" | null;
lastSyncError: string | null;
syncedVersionHash: string | null;
quoteNumber: string;
validUntil: string | null;
convertedToTaskId: string | null;
convertedAt: Date | null;
pdfUrl: string | null;
pdfKey: string | null;
pdfGeneratedAt: Date | null;
accountingSystemQuoteId: string | null;
} | nullmutation
quotes.deleteInferred outputSoft delete a quote. Attempts to roll back the sequence number if it was the highest.
Input
{
id: string;
}Output
{
success: boolean;
error: string;
} | {
success: boolean;
error?: undefined;
}mutation
quotes.addLineInferred outputAdd a line to a quote.
Input
{
description: string;
amount: number;
unitPrice: number;
quoteId: string;
displayOrder?: number | undefined;
quantity?: number | undefined;
unit?: string | undefined;
isOptional?: boolean | undefined;
}Output
{
id: string;
organizationId: string;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
description: string;
amount: string;
displayOrder: number | null;
quantity: string | null;
unit: string | null;
unitPrice: string;
quoteId: string;
isOptional: boolean | null;
}mutation
quotes.updateLineInferred outputUpdate a quote line.
Input
{
id: string;
description?: string | undefined;
amount?: number | undefined;
displayOrder?: number | undefined;
quantity?: number | undefined;
unit?: string | null | undefined;
unitPrice?: number | undefined;
isOptional?: boolean | undefined;
}Output
{
id: string;
organizationId: string;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
description: string;
amount: string;
displayOrder: number | null;
quantity: string | null;
unit: string | null;
unitPrice: string;
quoteId: string;
isOptional: boolean | null;
} | nullmutation
quotes.removeLineInferred outputRemove a line from a quote.
Input
{
id: string;
}Output
{
success: boolean;
error: string;
} | {
success: boolean;
error?: undefined;
}mutation
quotes.recalculateTotalsInferred outputRecalculate quote totals from lines.
Input
{
id: string;
}Output
{
id: string;
status: "draft" | "rejected" | "sent" | "accepted" | "expired" | "converted" | null;
organizationId: string;
rootTaskId: string | null;
name: string | null;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
notes: string | null;
contactId: string;
currency: string | null;
lastSyncedAt: Date | null;
issuedDate: string | null;
subtotal: string | null;
tax: string | null;
total: string | null;
terms: string | null;
accountingSyncStatus: "not_synced" | "synced" | "modified" | "sync_failed" | "syncing" | null;
accountingSystemId: "xero" | "quickbooks" | "myob" | null;
lastSyncError: string | null;
syncedVersionHash: string | null;
quoteNumber: string;
validUntil: string | null;
convertedToTaskId: string | null;
convertedAt: Date | null;
pdfUrl: string | null;
pdfKey: string | null;
pdfGeneratedAt: Date | null;
accountingSystemQuoteId: string | null;
} | nullmutation
quotes.generatePdfInferred outputGenerate PDF for a quote. Triggers async PDF generation via Inngest.
Input
{
quoteId: string;
}Output
{
success: boolean;
error: string;
message?: undefined;
quoteId?: undefined;
} | {
success: boolean;
message: string;
quoteId: string;
error?: undefined;
}query
quotes.getPdfUrlInferred outputGet PDF URL for a quote (for polling completion status).
Input
{
quoteId: string;
}Output
{
ready: boolean;
url?: string | null | undefined;
generatedAt?: Date | null | undefined;
error?: string | undefined;
}mutation
quotes.sendEmailInferred outputSend a quote email through the existing Inngest email workflow.
Input
{
quoteId: string;
recipientEmail?: string | undefined;
personalMessage?: string | undefined;
}Output
{
quoteId: string;
recipientEmail: string;
message: string;
}