UNPKG

@tmlmobilidade/interfaces

Version:

This package provides SDK-style connectors for interacting with databases (e.g., stops, plans, rides, alerts) and external providers (e.g., authentication, storage). It simplifies data access and integration across projects.

42 lines (41 loc) 1.47 kB
import { MongoCollectionClass } from '../../common/mongo-collection.js'; import { type CreateFareDto, type Fare, type UpdateFareDto } from '@tmlmobilidade/types'; import { IndexDescription } from 'mongodb'; import { z } from 'zod'; declare class FaresClass extends MongoCollectionClass<Fare, CreateFareDto, UpdateFareDto> { private static _instance; protected createSchema: z.ZodSchema; protected updateSchema: z.ZodSchema; private constructor(); static getInstance(): Promise<FaresClass>; /** * Finds Fare documents by agency IDs. * * @param ids - The agency IDs to search for // * @returns A promise that resolves to an array of matching documents */ findByAgencyIds(ids: string[]): Promise<import("mongodb").WithId<{ _id: string; created_at: number & { __brand: "UnixTimestamp"; }; created_by: string | null; is_locked: boolean; updated_at: number & { __brand: "UnixTimestamp"; }; code: string; name: string; agency_ids: string[]; currency_type: "EUR"; payment_method: "0" | "1"; price: number; transfers: "0" | "1" | "2" | "unlimited"; updated_by?: string | undefined; }>[]>; protected getCollectionIndexes(): IndexDescription[]; protected getCollectionName(): string; protected getEnvName(): string; } export declare const fares: FaresClass; export {};