This commit is contained in:
2026-03-14 16:50:03 -05:00
parent a8d0533f4a
commit 70f55c98b5
12 changed files with 477 additions and 11 deletions

View File

@@ -9,6 +9,8 @@ import type {
LoginResponse,
} from "@mrp/shared";
import type {
CrmContactEntryDto,
CrmContactEntryInput,
CrmRecordDetailDto,
CrmRecordInput,
CrmRecordStatus,
@@ -140,6 +142,16 @@ export const api = {
token
);
},
createCustomerContactEntry(token: string, customerId: string, payload: CrmContactEntryInput) {
return request<CrmContactEntryDto>(
`/api/v1/crm/customers/${customerId}/contact-history`,
{
method: "POST",
body: JSON.stringify(payload),
},
token
);
},
getVendors(token: string, filters?: { q?: string; status?: CrmRecordStatus; state?: string }) {
return request<CrmRecordSummaryDto[]>(
`/api/v1/crm/vendors${buildQueryString({
@@ -174,6 +186,16 @@ export const api = {
token
);
},
createVendorContactEntry(token: string, vendorId: string, payload: CrmContactEntryInput) {
return request<CrmContactEntryDto>(
`/api/v1/crm/vendors/${vendorId}/contact-history`,
{
method: "POST",
body: JSON.stringify(payload),
},
token
);
},
getGanttDemo(token: string) {
return request<{ tasks: GanttTaskDto[]; links: GanttLinkDto[] }>("/api/v1/gantt/demo", undefined, token);
},