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.53 kB
import { MongoCollectionClass } from '../../common/mongo-collection.js'; import { type CreateTypologyDto, type Typology, type UpdateTypologyDto } from '@tmlmobilidade/types'; import { IndexDescription } from 'mongodb'; import { z } from 'zod'; declare class TypologiesClass extends MongoCollectionClass<Typology, CreateTypologyDto, UpdateTypologyDto> { private static _instance; protected createSchema: z.ZodSchema; protected updateSchema: z.ZodSchema; private constructor(); static getInstance(): Promise<TypologiesClass>; /** * Finds Typology 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[]; color: string; default_onboard_fare_ids: string[] | null; default_prepaid_fare_id: string | null; text_color: string; updated_by?: string | undefined; }>[]>; protected getCollectionIndexes(): IndexDescription[]; protected getCollectionName(): string; protected getEnvName(): string; } export declare const typologies: TypologiesClass; export {};