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.

40 lines (39 loc) 1.51 kB
import { MongoCollectionClass } from '../../common/mongo-collection.js'; import { CreateYearPeriodDto, UpdateYearPeriodDto, type YearPeriod } from '@tmlmobilidade/types'; import { IndexDescription } from 'mongodb'; import { z } from 'zod'; declare class YearPeriodsClass extends MongoCollectionClass<YearPeriod, CreateYearPeriodDto, UpdateYearPeriodDto> { private static _instance; protected createSchema: z.ZodSchema; protected updateSchema: z.ZodSchema; private constructor(); static getInstance(): Promise<YearPeriodsClass>; /** * Finds YearPeriod documents by agency ID. * * @param id - The agency ID to search for * @returns A promise that resolves to an array of matching documents */ findByAgencyId(id: string): Promise<import("mongodb").WithId<{ _id: string; created_at: number & { __brand: "UnixTimestamp"; }; created_by: string | null; is_locked: boolean; updated_at: number & { __brand: "UnixTimestamp"; }; name: string; agency_ids: string[]; updated_by?: string | undefined; code?: string | undefined; color?: string | undefined; dates?: import("@tmlmobilidade/types").OperationalDate[] | undefined; }>[]>; protected getCollectionIndexes(): IndexDescription[]; protected getCollectionName(): string; protected getEnvName(): string; } export declare const yearPeriods: YearPeriodsClass; export {};