@alba-cars/common-modules
Version:
A package containing DTOs, validation classes and common modules and interfaces for Alba Cars
105 lines (104 loc) • 3.27 kB
TypeScript
import { LeadStatus } from "../enum/lead_status_type";
import { LeadSource } from "../enum/lead_source_status_types";
import { LeadPreferencesDTO } from "./lead_prefernce_dto";
import { LeadPreferencesCreateDTO } from "./lead_prefernce_dto";
import { TypedFilter, TypedOptions } from "../../../../global/utilities";
import { BaseGetDTO } from "../../../../global";
import { Deposit } from "../../../models/Deposit";
export declare class LeadDTO {
id: string;
firstName: string;
lastName: string;
email?: string;
phone: string;
alternatePhone?: string;
address?: string;
city?: string;
state?: string;
zipCode?: string;
status: LeadStatus;
notes?: string;
leadSource: LeadSource;
isTestDriveScheduled: boolean;
testDriveDate?: Date;
isActive: boolean;
lastContactedAt?: Date;
preference?: LeadPreferencesDTO;
deposits?: Deposit[];
validate(): string[];
static fromPlain(plain: Record<string, unknown>): LeadDTO;
toPlain(): Record<string, unknown>;
}
export declare class LeadUpdateDTO {
firstName?: string;
lastName?: string;
email?: string;
phone?: string;
alternatePhone?: string;
address?: string;
city?: string;
state?: string;
zipCode?: string;
status?: LeadStatus;
notes?: string;
leadSource?: LeadSource;
isTestDriveScheduled?: boolean;
testDriveDate?: Date;
isActive?: boolean;
preference?: LeadPreferencesDTO;
validate(): string[];
static fromPlain(plain: Record<string, unknown>): LeadUpdateDTO;
toPlain(): Record<string, unknown>;
}
export declare class LeadCreateDTO {
firstName: string;
lastName: string;
email?: string;
phone: string;
alternatePhone?: string;
address?: string;
city?: string;
state?: string;
country?: string;
zipCode?: string;
company?: string;
jobTitle?: string;
notes?: string;
source?: string;
status?: string;
assignedTo?: string;
leadType?: string;
leadStage?: string;
rating?: number;
isQualified?: boolean;
lastContactDate?: Date;
lastContactType?: string;
totalInteractions?: number;
preference?: LeadPreferencesCreateDTO;
validate(): string[];
static fromPlain(plain: Record<string, unknown>): LeadCreateDTO;
toPlain(): Record<string, unknown>;
}
export declare class LeadFilter extends TypedFilter {
id?: string | string[];
firstName?: string | string[];
lastName?: string | string[];
email?: string | string[];
phone?: string | string[];
status?: LeadStatus | LeadStatus[];
leadSource?: LeadSource | LeadSource[];
isTestDriveScheduled?: boolean;
isActive?: boolean;
search?: string;
lastContactedAt?: Date;
fromDate?: Date;
toDate?: Date;
}
export declare class LeadOptions extends TypedOptions<LeadDTO> {
}
export declare class LeadGetDTO extends BaseGetDTO<LeadDTO, LeadFilter> {
filters?: LeadFilter;
options?: LeadOptions;
static fromPlain<T extends BaseGetDTO<LeadDTO, LeadFilter>>(this: new () => T, plain: Record<string, unknown>): T;
toPlain(): Record<string, unknown>;
}