@hhgtech/hhg-components
Version:
Hello Health Group common components
248 lines (247 loc) • 5.93 kB
TypeScript
import { LocaleType } from "../../interfaces/types";
type Extends<T, U extends T> = U;
export type CareLocaleType = Extends<LocaleType, 'en-PH' | 'vi-VN' | 'id-ID' | 'zh-TW' | 'tl-PH' | 'ms-MY'>;
export declare enum RedirectType {
'SPECIALTY' = 1,
'DOCTOR' = 2,
'CLINIC' = 3,
'SERVICE' = 4
}
export type City = {
name: string;
country?: string;
id: number;
slug: string;
};
export type Services = {
id: number | string;
name: string;
email: string;
phone: string;
logo: string;
price: string;
priceUnit: string;
description: string;
};
export type Doctor = {
name: string;
description: string;
avatar: string;
price: number | string;
phone: string;
priceUnit: string;
provideCare: number | null;
distance?: string;
id: number;
priceDescription: string;
hospital?: Hospital | null;
experiences: Experiences;
isActive?: boolean;
organization: OrganizationInfoApi;
specialties: string[] | {
id: number;
name: string;
}[];
slug: string;
cityName: string;
};
export type Service = {
id: number;
logoService: string;
hospitalId: number;
hospitalBranchId: number;
serviceId: number;
name: string;
email: string;
phone: string;
price: string;
priceUnit: string;
description: string;
status: number;
createdAt: string;
hospitalBranch: Hospital;
distance: string;
slug?: string;
};
export type Hospital = {
id: number;
name: string;
slug: string;
description: string;
logo: string;
cityId: number;
phone: string;
longitude: string;
latitude: string;
address: string;
openAt: string | null;
closeAt: string | null;
insurances: Insurance[];
specialties?: Specialty[];
medicalFacilities: string[];
about: string;
weekDayHours: string;
weekendHours: string;
images: {
imageOne: string;
imageTwo: string;
imageThree: string;
imageFour: string;
imageFive: string;
};
services: ServiceInfoApi[];
workingTimes: {
[key: string]: string[];
} | null;
};
export type Insurance = {
id: number | string;
name: string;
logo: string;
created_at: string;
};
export type Specialty = {
name: string;
id: number;
thumbnail: string;
total_doctor: number;
slug: string;
};
export type ServiceInfoApi = {
id: number;
logo: string;
hospital_id: number;
hospital_branch_id: number;
service_id: number;
name: string;
email: string;
phone: string;
price: string;
price_unit: string;
description: string;
status: number;
created_at: string;
hospital_branch: HospitalApi;
distance: string;
avatar: string;
};
export type DoctorInfoApi = {
name: string;
description: string;
avatar: string;
price: number | string;
phone: string;
price_unit: string;
provide_care: number;
distance?: string;
id: number;
price_description: string;
hospital_branch?: HospitalApi;
experiences: Experiences;
organization: OrganizationInfoApi;
specialties: string[] | {
id: number;
name: string;
}[];
slug: string;
};
export type OrganizationInfoApi = {
id: number | string;
name: string;
logo?: string;
};
export type HospitalApi = {
id: number;
hospital_id: number;
name: string;
phone: string;
logo: string;
city_id: number;
longitude: string;
latitude: string;
address: string;
open_at?: string;
close_at?: string;
insurances?: Insurance[];
specialties?: Specialty[];
medical_facilities: string;
description: string;
about: string;
weekday_hours: string;
weekend_hours: string;
images: {
image_0: string;
image_1: string;
image_2: string;
image_3: string;
image_4: string;
};
services: ServiceInfoApi[];
working_times: {
[key: string]: {
day: string;
start_at: string;
end_at: string;
}[];
};
city: City;
};
export type Experiences = Array<{
description: string;
}>;
export type Clinic = {
name: string;
id: number;
slug: string;
};
export type LocalizedSlugsType = 'HOSPITAL' | 'SERVICE' | 'DOCTOR' | 'ALL' | 'SEARCH' | 'SPECIALTIES' | 'CURRENT';
export type SearchDataBookingApi = {
hospitals: HospitalApi[];
doctors: DoctorInfoApi[];
specialties: Specialty[] & {
total_hospital_service: number;
};
};
export type SearchBarSectionItemApi = {
id: number;
name: string;
slug: string;
avatar?: string;
logo?: string;
thumbnail?: string;
};
export type SearchBarSectionApi = {
type: 'doctors' | 'specialties' | 'services' | 'hospitals';
results: SearchBarSectionItemApi[];
};
export type SearchBarTabSectionApi = {
doctor?: SearchBarSectionItemApi[];
specialty?: SearchBarSectionItemApi[];
service?: SearchBarSectionItemApi[];
hospital?: SearchBarSectionItemApi[];
};
export type SpecialtySearchApi = {
specialties?: SearchBarSectionItemApi[];
};
export type PopularKeySearchItemApi = {
country: string;
created_at: string;
created_by: string;
id: number;
keyword: string;
position: number;
type: string;
updated_at: string;
url: string;
};
export type PopularKeySearchApi = {
popular_searches?: PopularKeySearchItemApi[];
};
export type SearchCityByGeoIpApi = {
cities: City[];
default: City;
};
export type SearchCityByKeywordApi = {
cities: City[];
};
export {};