Monument

Expenses

Operational and project expense records.

externalpermissionstable9 procedures
queryexpenses.listInferred output

List expenses for the organization with optional filters.

Input
{
  status?: "draft" | "pending" | "approved" | "rejected" | "paid" | undefined;
  taskId?: string | undefined;
  rootTaskId?: string | undefined;
  isBillable?: boolean | undefined;
  limit?: number | undefined;
  offset?: number | undefined;
  isInvoiced?: boolean | undefined;
  supplierId?: string | undefined;
  claimedByResourceId?: string | undefined;
  expenseType?: "supplier_invoice" | "staff_claim" | "direct_cost" | undefined;
  category?: string | undefined;
  dateFrom?: string | undefined;
  dateTo?: string | undefined;
  includeChildTasks?: boolean | undefined;
}
Output
ExpenseListResult
queryexpenses.getByIdInferred output

Get a single expense by ID.

Input
{
  id: string;
}
Output
{
  id: string;
  status: "draft" | "pending" | "approved" | "rejected" | "paid" | null;
  organizationId: string;
  taskId: string | null;
  rootTaskId: string | null;
  date: string;
  createdAt: Date;
  updatedAt: Date | null;
  deletedAt: Date | null;
  description: string | null;
  tags: Array<string> | null;
  isBillable: boolean | null;
  isInvoiced: boolean | null;
  invoiceLineId: string | null;
  supplierId: string | null;
  claimedByResourceId: string | null;
  purchaseOrderId: string | null;
  purchaseOrderLineId: string | null;
  expenseType: "supplier_invoice" | "staff_claim" | "direct_cost";
  category: string | null;
  amount: string;
  currency: string | null;
  referenceNumber: string | null;
  reimbursementStatus: "draft" | "pending" | "approved" | "rejected" | "paid" | null;
  markupPercentage: string | null;
  billableAmount: string | null;
} | null
queryexpenses.getSummaryByCategoryInferred output

Get expense summary by category for a date range.

Input
{
  dateFrom: string;
  dateTo: string;
  rootTaskId?: string | undefined;
}
Output
Array<ExpenseCategorySummary>
mutationexpenses.createInferred output

Create a new expense.

Input
{
  date: string;
  expenseType: "supplier_invoice" | "staff_claim" | "direct_cost";
  amount: number;
  status?: "draft" | "pending" | "approved" | "rejected" | "paid" | undefined;
  taskId?: string | undefined;
  rootTaskId?: string | undefined;
  description?: string | undefined;
  tags?: Array<string> | undefined;
  isBillable?: boolean | undefined;
  supplierId?: string | undefined;
  claimedByResourceId?: string | undefined;
  purchaseOrderId?: string | undefined;
  purchaseOrderLineId?: string | undefined;
  category?: string | undefined;
  currency?: string | undefined;
  referenceNumber?: string | undefined;
  reimbursementStatus?: "draft" | "pending" | "approved" | "rejected" | "paid" | undefined;
  markupPercentage?: number | undefined;
  billableAmount?: number | undefined;
}
Output
{
  id: string;
  status: "draft" | "pending" | "approved" | "rejected" | "paid" | null;
  organizationId: string;
  taskId: string | null;
  rootTaskId: string | null;
  date: string;
  createdAt: Date;
  updatedAt: Date | null;
  deletedAt: Date | null;
  description: string | null;
  tags: Array<string> | null;
  isBillable: boolean | null;
  isInvoiced: boolean | null;
  invoiceLineId: string | null;
  supplierId: string | null;
  claimedByResourceId: string | null;
  purchaseOrderId: string | null;
  purchaseOrderLineId: string | null;
  expenseType: "supplier_invoice" | "staff_claim" | "direct_cost";
  category: string | null;
  amount: string;
  currency: string | null;
  referenceNumber: string | null;
  reimbursementStatus: "draft" | "pending" | "approved" | "rejected" | "paid" | null;
  markupPercentage: string | null;
  billableAmount: string | null;
}
mutationexpenses.updateInferred output

Update an expense.

Input
{
  id: string;
  status?: "draft" | "pending" | "approved" | "rejected" | "paid" | undefined;
  taskId?: string | null | undefined;
  rootTaskId?: string | null | undefined;
  date?: string | undefined;
  description?: string | null | undefined;
  tags?: Array<string> | undefined;
  isBillable?: boolean | undefined;
  supplierId?: string | null | undefined;
  claimedByResourceId?: string | null | undefined;
  purchaseOrderId?: string | null | undefined;
  purchaseOrderLineId?: string | null | undefined;
  expenseType?: "supplier_invoice" | "staff_claim" | "direct_cost" | undefined;
  category?: string | null | undefined;
  amount?: number | undefined;
  currency?: string | undefined;
  referenceNumber?: string | null | undefined;
  reimbursementStatus?: "draft" | "pending" | "approved" | "rejected" | "paid" | null | undefined;
  markupPercentage?: number | undefined;
  billableAmount?: number | null | undefined;
}
Output
{
  id: string;
  status: "draft" | "pending" | "approved" | "rejected" | "paid" | null;
  organizationId: string;
  taskId: string | null;
  rootTaskId: string | null;
  date: string;
  createdAt: Date;
  updatedAt: Date | null;
  deletedAt: Date | null;
  description: string | null;
  tags: Array<string> | null;
  isBillable: boolean | null;
  isInvoiced: boolean | null;
  invoiceLineId: string | null;
  supplierId: string | null;
  claimedByResourceId: string | null;
  purchaseOrderId: string | null;
  purchaseOrderLineId: string | null;
  expenseType: "supplier_invoice" | "staff_claim" | "direct_cost";
  category: string | null;
  amount: string;
  currency: string | null;
  referenceNumber: string | null;
  reimbursementStatus: "draft" | "pending" | "approved" | "rejected" | "paid" | null;
  markupPercentage: string | null;
  billableAmount: string | null;
} | null
mutationexpenses.deleteInferred output

Soft delete an expense.

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

Approve an expense.

Input
{
  id: string;
}
Output
{
  id: string;
  status: "draft" | "pending" | "approved" | "rejected" | "paid" | null;
  organizationId: string;
  taskId: string | null;
  rootTaskId: string | null;
  date: string;
  createdAt: Date;
  updatedAt: Date | null;
  deletedAt: Date | null;
  description: string | null;
  tags: Array<string> | null;
  isBillable: boolean | null;
  isInvoiced: boolean | null;
  invoiceLineId: string | null;
  supplierId: string | null;
  claimedByResourceId: string | null;
  purchaseOrderId: string | null;
  purchaseOrderLineId: string | null;
  expenseType: "supplier_invoice" | "staff_claim" | "direct_cost";
  category: string | null;
  amount: string;
  currency: string | null;
  referenceNumber: string | null;
  reimbursementStatus: "draft" | "pending" | "approved" | "rejected" | "paid" | null;
  markupPercentage: string | null;
  billableAmount: string | null;
} | null
mutationexpenses.rejectInferred output

Reject an expense.

Input
{
  id: string;
}
Output
{
  id: string;
  status: "draft" | "pending" | "approved" | "rejected" | "paid" | null;
  organizationId: string;
  taskId: string | null;
  rootTaskId: string | null;
  date: string;
  createdAt: Date;
  updatedAt: Date | null;
  deletedAt: Date | null;
  description: string | null;
  tags: Array<string> | null;
  isBillable: boolean | null;
  isInvoiced: boolean | null;
  invoiceLineId: string | null;
  supplierId: string | null;
  claimedByResourceId: string | null;
  purchaseOrderId: string | null;
  purchaseOrderLineId: string | null;
  expenseType: "supplier_invoice" | "staff_claim" | "direct_cost";
  category: string | null;
  amount: string;
  currency: string | null;
  referenceNumber: string | null;
  reimbursementStatus: "draft" | "pending" | "approved" | "rejected" | "paid" | null;
  markupPercentage: string | null;
  billableAmount: string | null;
} | null
mutationexpenses.markAsInvoicedInferred output

Mark expenses as invoiced.

Input
{
  invoiceLineId: string;
  ids: Array<string>;
}
Output
{
  updatedCount: number;
}