@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.
21 lines (20 loc) • 980 B
TypeScript
import { MongoCollectionClass } from '../../mongo-collection.js';
import { Agency, CreateAgencyDto, UpdateAgencyDto } from '@tmlmobilidade/types';
import { IndexDescription } from 'mongodb';
import { z } from 'zod';
declare class AgenciesClass extends MongoCollectionClass<Agency, CreateAgencyDto, UpdateAgencyDto> {
private static _instance;
protected createSchema: z.ZodSchema;
protected updateSchema: z.ZodSchema;
private constructor();
static getInstance(): Promise<AgenciesClass>;
findByCode(code: string): Promise<import("mongodb").WithId<Agency> | null>;
updateByCode(code: string, fields: Partial<Agency>): Promise<import("mongodb").UpdateResult<Agency>>;
protected getCollectionIndexes(): IndexDescription[];
protected getCollectionName(): string;
protected getCreateSchema(): z.ZodSchema;
protected getEnvName(): string;
protected getUpdateSchema(): z.ZodSchema;
}
export declare const agencies: AgenciesClass;
export {};