Monument

Contacts

Clients, consultants, and suppliers with parent and child hierarchy.

externalpermissionstable6 procedures
querycontacts.listInferred output

List contacts for the organization with optional filters.

Input
{
  search?: string | undefined;
  contactType?: "company" | "individual" | undefined;
  relationshipType?: "client" | "consultant" | "supplier" | "other" | undefined;
  parentContactId?: string | undefined;
  isActive?: boolean | undefined;
  isBillable?: boolean | undefined;
  limit?: number | undefined;
  offset?: number | undefined;
}
Output
PaginatedResult<{
  id: string;
  organizationId: string;
  name: string;
  phone: string | null;
  email: string | null;
  website: string | null;
  createdAt: Date;
  updatedAt: Date | null;
  deletedAt: Date | null;
  tags: Array<string> | null;
  notes: string | null;
  contactType: "company" | "individual";
  relationshipType: "client" | "consultant" | "supplier" | "other";
  parentContactId: string | null;
  isActive: boolean | null;
  isBillable: boolean | null;
  jobTitle: string | null;
  billingEmail: string | null;
  billingAddress: string | null;
  paymentTermsDays: number | null;
  emailBounced: boolean | null;
  emailBouncedAt: Date | null;
  taxNumber: string | null;
}>
querycontacts.getByIdInferred output

Get a single contact by ID.

Input
{
  id: string;
}
Output
{
  id: string;
  organizationId: string;
  name: string;
  phone: string | null;
  email: string | null;
  website: string | null;
  createdAt: Date;
  updatedAt: Date | null;
  deletedAt: Date | null;
  tags: Array<string> | null;
  notes: string | null;
  contactType: "company" | "individual";
  relationshipType: "client" | "consultant" | "supplier" | "other";
  parentContactId: string | null;
  isActive: boolean | null;
  isBillable: boolean | null;
  jobTitle: string | null;
  billingEmail: string | null;
  billingAddress: string | null;
  paymentTermsDays: number | null;
  emailBounced: boolean | null;
  emailBouncedAt: Date | null;
  taxNumber: string | null;
} | null
querycontacts.getChildrenInferred output

Get contacts that are children of a parent contact.

Input
{
  parentId: string;
}
Output
Array<{
  id: string;
  organizationId: string;
  name: string;
  phone: string | null;
  email: string | null;
  website: string | null;
  createdAt: Date;
  updatedAt: Date | null;
  deletedAt: Date | null;
  tags: Array<string> | null;
  notes: string | null;
  contactType: "company" | "individual";
  relationshipType: "client" | "consultant" | "supplier" | "other";
  parentContactId: string | null;
  isActive: boolean | null;
  isBillable: boolean | null;
  jobTitle: string | null;
  billingEmail: string | null;
  billingAddress: string | null;
  paymentTermsDays: number | null;
  emailBounced: boolean | null;
  emailBouncedAt: Date | null;
  taxNumber: string | null;
}>
mutationcontacts.createInferred output

Create a new contact.

Input
{
  name: string;
  contactType: "company" | "individual";
  phone?: string | undefined;
  email?: string | undefined;
  website?: string | undefined;
  tags?: Array<string> | undefined;
  notes?: string | undefined;
  relationshipType?: "client" | "consultant" | "supplier" | "other" | undefined;
  parentContactId?: string | undefined;
  isActive?: boolean | undefined;
  isBillable?: boolean | undefined;
  jobTitle?: string | undefined;
  billingEmail?: string | undefined;
  billingAddress?: string | undefined;
  paymentTermsDays?: number | undefined;
  taxNumber?: string | undefined;
}
Output
{
  id: string;
  organizationId: string;
  name: string;
  phone: string | null;
  email: string | null;
  website: string | null;
  createdAt: Date;
  updatedAt: Date | null;
  deletedAt: Date | null;
  tags: Array<string> | null;
  notes: string | null;
  contactType: "company" | "individual";
  relationshipType: "client" | "consultant" | "supplier" | "other";
  parentContactId: string | null;
  isActive: boolean | null;
  isBillable: boolean | null;
  jobTitle: string | null;
  billingEmail: string | null;
  billingAddress: string | null;
  paymentTermsDays: number | null;
  emailBounced: boolean | null;
  emailBouncedAt: Date | null;
  taxNumber: string | null;
}
mutationcontacts.updateInferred output

Update a contact.

Input
{
  id: string;
  name?: string | undefined;
  phone?: string | null | undefined;
  email?: string | null | undefined;
  website?: string | null | undefined;
  tags?: Array<string> | undefined;
  notes?: string | null | undefined;
  contactType?: "company" | "individual" | undefined;
  relationshipType?: "client" | "consultant" | "supplier" | "other" | undefined;
  parentContactId?: string | null | undefined;
  isActive?: boolean | undefined;
  isBillable?: boolean | undefined;
  jobTitle?: string | null | undefined;
  billingEmail?: string | null | undefined;
  billingAddress?: string | null | undefined;
  paymentTermsDays?: number | null | undefined;
  taxNumber?: string | null | undefined;
}
Output
{
  id: string;
  organizationId: string;
  name: string;
  phone: string | null;
  email: string | null;
  website: string | null;
  createdAt: Date;
  updatedAt: Date | null;
  deletedAt: Date | null;
  tags: Array<string> | null;
  notes: string | null;
  contactType: "company" | "individual";
  relationshipType: "client" | "consultant" | "supplier" | "other";
  parentContactId: string | null;
  isActive: boolean | null;
  isBillable: boolean | null;
  jobTitle: string | null;
  billingEmail: string | null;
  billingAddress: string | null;
  paymentTermsDays: number | null;
  emailBounced: boolean | null;
  emailBouncedAt: Date | null;
  taxNumber: string | null;
} | null
mutationcontacts.deleteInferred output

Soft delete a contact.

Input
{
  id: string;
}
Output
{
  success: boolean;
  error: string;
} | {
  success: boolean;
  error?: undefined;
}