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.

45 lines (44 loc) 1.7 kB
import { MongoCollectionClass } from '../../common/mongo-collection.js'; import { type CreateLineDto, type Line, type UpdateLineDto } from '@tmlmobilidade/types'; import { IndexDescription } from 'mongodb'; import { z } from 'zod'; declare class LinesClass extends MongoCollectionClass<Line, CreateLineDto, UpdateLineDto> { private static _instance; protected createSchema: z.ZodSchema; protected updateSchema: z.ZodSchema; private constructor(); static getInstance(): Promise<LinesClass>; /** * Finds Line 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_id: string; interchange: "0" | "1" | "2"; is_circular_line: boolean; is_school_line: boolean; onboard_fare_ids: string[] | null; prepaid_fare_id: string | null; transport_type: "ferry" | "subway" | "aerial_lift" | "bus" | "cable_tram" | "funicular" | "monorail" | "rail" | "tram" | "trolleybus"; typology: string | null; updated_by?: string | undefined; }>[]>; protected getCollectionIndexes(): IndexDescription[]; protected getCollectionName(): string; protected getEnvName(): string; } export declare const lines: LinesClass; export {};