@golemio/pid
Version:
Golemio PID Module
28 lines (27 loc) • 1.49 kB
TypeScript
import { JISInfotextsModel } from "../../../schema-definitions/jis/models/JISInfotextsModel";
import { ILogger } from "@golemio/core/dist/helpers";
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
import { AbstractBasicRepository } from "@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractBasicRepository";
import { JISInfotextRopidGTFSStopsRepository } from "./JISInfotextRopidGTFSStopsRepository";
export declare class JISInfotextRepository extends AbstractBasicRepository {
schema: string;
tableName: string;
private sequelizeModel;
private gtfsStopRepository;
constructor(infotextStopRepository: JISInfotextRopidGTFSStopsRepository, connector: IDatabaseConnector, logger: ILogger);
/**
* Find all active infotexts for given stops and time for PID departure boards API
*
* @param stopsIds GTFS stop IDs for which the infotexts should be fetched
* @param timeFrom Time from which the infotexts should be valid (default is current time)
* @returns Active infotexts
*/
findAllForDepartureBoard(stopsIds: string[], timeFrom?: Date): Promise<JISInfotextsModel[]>;
/**
* Find all active infotexts for given time for PID infotexts API
*
* @param timeFrom Time from which the infotexts should be valid (default is current time)
* @returns Active infotexts
*/
findAllForOverview(timeFrom?: Date): Promise<JISInfotextsModel[]>;
}