Monument

Quotes

Quote creation, conversion, and approval workflows.

externalpermissionstable12 procedures
queryquotes.listInferred output

List 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
QuoteListResult
queryquotes.getByIdInferred output

Get 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 | null
mutationquotes.createInferred output

Create 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;
}
mutationquotes.updateInferred output

Update 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;
} | null
mutationquotes.deleteInferred output

Soft 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;
}
mutationquotes.addLineInferred output

Add 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;
}
mutationquotes.updateLineInferred output

Update 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;
} | null
mutationquotes.removeLineInferred output

Remove a line from a quote.

Input
{
  id: string;
}
Output
{
  success: boolean;
  error: string;
} | {
  success: boolean;
  error?: undefined;
}
mutationquotes.recalculateTotalsInferred output

Recalculate 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;
} | null
mutationquotes.generatePdfInferred output

Generate 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;
}
queryquotes.getPdfUrlInferred output

Get 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;
}
mutationquotes.sendEmailInferred output

Send 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;
}