@alba-cars/common-modules
Version:
A package containing DTOs, validation classes and common modules and interfaces for Alba Cars
53 lines (52 loc) • 2.06 kB
TypeScript
import { VehicleMakeFilter, VehicleMakeOptions, VehicleMakeUniqueFilter } from "../utilities";
import { BaseCreateDTO, BaseUpdateDTO } from "./BaseDTO";
import { VehicleMake } from "../../../models";
export declare class VehicleMakeGetDTO {
filter?: VehicleMakeFilter;
options?: VehicleMakeOptions;
validate(): string[];
static fromPlain(plain: Record<string, unknown>): VehicleMakeGetDTO;
static toPlain(entity: any): Record<string, unknown>;
}
export type VehicleMakeApiResponse = Omit<VehicleMake, "createdBy" | "updatedBy" | "deletedBy" | "_id">;
export declare class VehicleMakeGetUniqueDTO {
filter?: VehicleMakeUniqueFilter;
options?: Omit<VehicleMakeOptions, "page" | "limit" | "sort">;
validate(): string[];
static fromPlain(plain: Record<string, unknown>): VehicleMakeGetUniqueDTO;
static toPlain(entity: any): Record<string, unknown>;
}
export declare class VehicleMakeCreateDTO extends BaseCreateDTO {
name: string;
image?: string;
description?: string;
metaTitle?: string;
metaDescription?: string;
metaKeywords?: string;
promoted?: boolean;
showInFooter?: boolean;
validate(): string[];
static fromPlain(plain: Record<string, unknown>): VehicleMakeCreateDTO;
static toPlain(entity: any): Record<string, unknown>;
}
export declare class VehicleMakeUpdateDTO extends BaseUpdateDTO {
name?: string;
image?: string;
description?: string;
metaTitle?: string;
metaDescription?: string;
metaKeywords?: string;
promoted?: boolean;
showInFooter?: boolean;
isActive?: boolean;
validate(): string[];
static fromPlain(plain: Record<string, unknown>): VehicleMakeUpdateDTO;
static toPlain(entity: any): Record<string, unknown>;
}
export declare class DynamicMakeDTO {
existingId?: string;
new?: VehicleMakeCreateDTO;
validate(): void;
static fromPlain(plain: Record<string, unknown>): DynamicMakeDTO;
static toPlain(entity: any): Record<string, unknown>;
}