UNPKG

@hhgtech/hhg-components

Version:
369 lines (368 loc) • 8.92 kB
import { LocaleType } from "../../interfaces/types"; import { EMERGENCY_STATUS, ServicePrice } from "../../constants"; type Extends<T, U extends T> = U; export type CareLocaleType = Extends<LocaleType, 'en-PH' | 'vi-VN' | 'id-ID' | 'zh-TW' | 'tl-PH' | 'ms-MY' | 'th-TH'>; export declare enum RedirectType { 'SPECIALTY' = 1, 'DOCTOR' = 2, 'CLINIC' = 3, 'SERVICE' = 4 } export type OpeningHourDay = 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun'; 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 OrgExtraInfo = { banner: string; description: string; id: number; logo: string; name: string; slug: string; widgetToken: string; publishReviews: 0 | 1; isActive: number; }; export type BranchService = { id?: string | number; name: string; description: string; price?: number; priceType: ServicePrice; priceTo?: number; promoPercent?: number | null; }; export type ServiceCategory = { name: string; id: string | number; services: BranchService[]; }; export type AcceptedPayment = { id: number; countryId: number; name: string; logo: string; }; export type FAQ = { id?: number; question: string; answer: string; }; export type OpeningHour = { day: OpeningHourDay; start: string; end: string; }; export type Hospital = { id: number; 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; email?: string; name?: string; emergencyHours?: EMERGENCY_STATUS; totalDoctors?: number; totalAvailableDoctors?: number; totalAvailableServices?: number; city?: City; rating?: number; totalReviews?: number; organization?: OrgExtraInfo; showServiceCategory?: boolean; serviceCategories?: ServiceCategory[]; patientGuide?: string; featuredDoctors?: Doctor[]; faqs?: FAQ[]; acceptedPayments?: AcceptedPayment[]; bookingUrl?: string | null; websiteUrl?: string | null; openingHours?: OpeningHour[]; status?: number; client?: ClientApi | 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 type CityInfoApi = { id: number; name: string; slug: string; country?: string; }; export type OrgExtraInfoApi = { banner: string | null; description: string | null; id: number; logo: string; name: string; slug: string; widget_token: string; publish_reviews: 0 | 1; is_active: number; }; export type AcceptedPaymentApi = { id: number; country_id: number; name: string; logo: string; }; export type ClientApi = { description: string; id: number; name: string; }; export type HospitalBranchApi = { address: string; city: CityInfoApi; id: number; insurances: Array<Insurance>; latitude: string; logo: string; longitude: string; name: string; rating: string; slug: string; total_available_doctor: number; total_doctor: number; total_reviews: number; organization?: OrgExtraInfoApi; accepted_payments?: AcceptedPaymentApi[]; working_times: { [key: string]: { day: string; start_at: string; end_at: string; }[]; }; emergency_hours: number; phone: string; email: string; client: ClientApi | null; short_name?: string; }; export declare const workingDays: string[]; export {};