CRM
This commit is contained in:
45
shared/src/crm/types.ts
Normal file
45
shared/src/crm/types.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
export const crmRecordStatuses = ["LEAD", "ACTIVE", "ON_HOLD", "INACTIVE"] as const;
|
||||
|
||||
export type CrmRecordStatus = (typeof crmRecordStatuses)[number];
|
||||
|
||||
export interface CrmRecordSummaryDto {
|
||||
id: string;
|
||||
name: string;
|
||||
email: string;
|
||||
phone: string;
|
||||
city: string;
|
||||
state: string;
|
||||
country: string;
|
||||
status: CrmRecordStatus;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface CrmRecordDetailDto extends CrmRecordSummaryDto {
|
||||
addressLine1: string;
|
||||
addressLine2: string;
|
||||
postalCode: string;
|
||||
notes: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface CrmRecordInput {
|
||||
name: string;
|
||||
email: string;
|
||||
phone: string;
|
||||
addressLine1: string;
|
||||
addressLine2: string;
|
||||
city: string;
|
||||
state: string;
|
||||
postalCode: string;
|
||||
country: string;
|
||||
status: CrmRecordStatus;
|
||||
notes: string;
|
||||
}
|
||||
|
||||
export type CustomerSummaryDto = CrmRecordSummaryDto;
|
||||
export type CustomerDetailDto = CrmRecordDetailDto;
|
||||
export type CustomerInput = CrmRecordInput;
|
||||
|
||||
export type VendorSummaryDto = CrmRecordSummaryDto;
|
||||
export type VendorDetailDto = CrmRecordDetailDto;
|
||||
export type VendorInput = CrmRecordInput;
|
||||
@@ -2,5 +2,6 @@ export * from "./auth/permissions.js";
|
||||
export * from "./auth/types.js";
|
||||
export * from "./common/api.js";
|
||||
export * from "./company/types.js";
|
||||
export * from "./crm/types.js";
|
||||
export * from "./files/types.js";
|
||||
export * from "./gantt/types.js";
|
||||
|
||||
Reference in New Issue
Block a user