@alba-cars/common-modules
Version:
A package containing DTOs, validation classes and common modules and interfaces for Alba Cars
104 lines (103 loc) • 2.52 kB
TypeScript
import { ReviewPlatform } from '../enums';
export declare class ReviewDTO {
id: string;
username: string;
photo?: string;
platform: ReviewPlatform;
comment: string;
minRating: number;
showPublic: boolean;
placeId?: string;
createdAt: Date;
updatedAt?: Date;
authorUrl?: string;
profilePhotoUrl?: string;
}
export declare class GoogleReviewDTO {
authorName: string;
authorUrl?: string;
profilePhotoUrl?: string;
rating: number;
text: string;
time: number;
relativeTimeDescription?: string;
placeId: string;
}
export declare class FetchGoogleReviewsDTO {
placeId: string;
fetch: boolean;
}
export declare class SaveGoogleReviewDTO {
username: string;
rating: number;
comment: string;
date: Date;
showPublic?: boolean;
}
export declare class GoogleReviewResponseDTO {
success: boolean;
message: string;
data: GoogleReviewDTO[];
}
export declare class ReviewGetDTO {
id: string;
placeId?: string;
platform?: ReviewPlatform;
comment?: string;
username?: string;
photo?: string;
showPublic?: boolean;
minRating?: number;
maxRating?: number;
skip?: number;
take?: number;
filters?: ReviewFilter;
options?: ReviewOptions;
validate(): string[];
static fromPlain(plain: Record<string, unknown>): ReviewGetDTO;
static toPlain(entity: any): Record<string, unknown>;
}
export declare class ReviewFilter {
id?: string;
placeId?: string;
platform?: ReviewPlatform;
comment?: string;
username?: string;
showPublic?: boolean;
search?: string;
minRating?: number;
maxRating?: number;
}
export declare class ReviewOptions {
skip?: number;
take?: number;
orderBy?: string;
orderDirection?: 'ASC' | 'DESC';
page?: number;
limit?: number;
}
export declare class UpdateReviewDTO {
id: string;
username?: string;
photo?: string;
platform?: ReviewPlatform;
comment?: string;
rating?: number;
showPublic?: boolean;
placeId?: string;
updatedAt?: Date;
}
export declare class CreateReviewDTO {
username?: string;
photo?: string;
platform?: ReviewPlatform;
comment?: string;
rating?: number;
showPublic?: boolean;
placeId?: string;
date?: Date;
}
export declare class UpdateReviewShowPublicDTO {
id: string;
showPublic: boolean;
}