crm2
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user