crm finish
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
export const crmRecordStatuses = ["LEAD", "ACTIVE", "ON_HOLD", "INACTIVE"] as const;
|
||||
export const crmContactEntryTypes = ["NOTE", "CALL", "EMAIL", "MEETING"] as const;
|
||||
export const crmLifecycleStages = ["PROSPECT", "ACTIVE", "DORMANT", "CHURNED"] as const;
|
||||
|
||||
export type CrmRecordStatus = (typeof crmRecordStatuses)[number];
|
||||
export type CrmContactEntryType = (typeof crmContactEntryTypes)[number];
|
||||
export type CrmLifecycleStage = (typeof crmLifecycleStages)[number];
|
||||
export const crmContactRoles = ["PRIMARY", "PURCHASING", "AP", "SHIPPING", "ENGINEERING", "SALES", "OTHER"] as const;
|
||||
export type CrmContactRole = (typeof crmContactRoles)[number];
|
||||
|
||||
@@ -58,6 +60,14 @@ export interface CrmCustomerHierarchyOptionDto {
|
||||
isReseller: boolean;
|
||||
}
|
||||
|
||||
export interface CrmRecordRollupsDto {
|
||||
lastContactAt: string | null;
|
||||
contactHistoryCount: number;
|
||||
contactCount: number;
|
||||
attachmentCount: number;
|
||||
childCustomerCount?: number;
|
||||
}
|
||||
|
||||
export interface CrmRecordSummaryDto {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -67,9 +77,15 @@ export interface CrmRecordSummaryDto {
|
||||
state: string;
|
||||
country: string;
|
||||
status: CrmRecordStatus;
|
||||
lifecycleStage?: CrmLifecycleStage;
|
||||
preferredAccount?: boolean;
|
||||
strategicAccount?: boolean;
|
||||
requiresApproval?: boolean;
|
||||
blockedAccount?: boolean;
|
||||
isReseller?: boolean;
|
||||
parentCustomerId?: string | null;
|
||||
parentCustomerName?: string | null;
|
||||
rollups?: CrmRecordRollupsDto;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
@@ -90,6 +106,12 @@ export interface CrmRecordDetailDto extends CrmRecordSummaryDto {
|
||||
taxExempt?: boolean;
|
||||
creditHold?: boolean;
|
||||
contacts?: CrmContactDto[];
|
||||
lifecycleStage?: CrmLifecycleStage;
|
||||
preferredAccount?: boolean;
|
||||
strategicAccount?: boolean;
|
||||
requiresApproval?: boolean;
|
||||
blockedAccount?: boolean;
|
||||
rollups?: CrmRecordRollupsDto;
|
||||
}
|
||||
|
||||
export interface CrmRecordInput {
|
||||
@@ -111,6 +133,11 @@ export interface CrmRecordInput {
|
||||
currencyCode?: string | null;
|
||||
taxExempt?: boolean;
|
||||
creditHold?: boolean;
|
||||
lifecycleStage?: CrmLifecycleStage;
|
||||
preferredAccount?: boolean;
|
||||
strategicAccount?: boolean;
|
||||
requiresApproval?: boolean;
|
||||
blockedAccount?: boolean;
|
||||
}
|
||||
|
||||
export type CustomerSummaryDto = CrmRecordSummaryDto;
|
||||
|
||||
Reference in New Issue
Block a user