Contacts
Clients, consultants, and suppliers with parent and child hierarchy.
externalpermissionstable6 procedures
query
contacts.listInferred outputList 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;
}>query
contacts.getByIdInferred outputGet 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;
} | nullquery
contacts.getChildrenInferred outputGet 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;
}>mutation
contacts.createInferred outputCreate 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;
}mutation
contacts.updateInferred outputUpdate 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;
} | nullmutation
contacts.deleteInferred outputSoft delete a contact.
Input
{
id: string;
}Output
{
success: boolean;
error: string;
} | {
success: boolean;
error?: undefined;
}