UNPKG

@golemio/parkings

Version:
55 lines (54 loc) 2.15 kB
import { CachedParkingSourcesRepository } from "../../helpers/data-access/CachedParkingSourcesRepository"; import { IGetParkingQueryOptions } from "./interfaces/IGetQueryOptions"; import { IPostalAddress } from "@golemio/core/dist/integration-engine/helpers/GeocodeApi"; import { SequelizeModel } from "@golemio/core/dist/output-gateway"; import { TGeoCoordinates } from "@golemio/core/dist/output-gateway/Geo"; import { IParkingsModels } from "."; import ICentroidPg from "./interfaces/ICentroidPg"; export interface IParkings { id: string; source: string; source_id: string; data_provider: string | null; name: string; category: string | null; date_modified: string | null; address: IPostalAddress | null; location: TGeoCoordinates; area_served: string | null; total_spot_number: number; valid_from: string | null; valid_to: string | null; distance?: number; parking_type: string | null; zone_type: string | null; centroid: ICentroidPg; measurements: { available_spots_last_updated: string; available_spots_number: number; }; parking_payments: { payment_web_url: string | null; payment_android_url: string | null; payment_ios_url: string | null; }; parking_tariffs_relation: { tariff_id: string; }; } export declare class ParkingsModel extends SequelizeModel { private parkingSourcesRepository; static MODEL_RELATION_ACTUAL_MEASUREMENTS: string; static MODEL_RELATION_PARKING_LOCATIONS: string; static MODEL_RELATION_PARKING_PAYMENTS: string; static MODEL_RELATION_PARKING_TARIFFS_RELATIONS: string; private paymentsRepository; private parkingTariffRelationsRepository; private geoConfigHelper; constructor(parkingSourcesRepository: CachedParkingSourcesRepository); Associate: (m: IParkingsModels) => void; GetAll: (options?: IGetParkingQueryOptions) => Promise<IParkings[]>; GetOne: (id: string) => Promise<IParkings>; GetAllDetail: (options?: IGetParkingQueryOptions) => Promise<IParkings[]>; GetOneDetail: (id: string) => Promise<IParkings>; }