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.59 kB
import { MongoCollectionClass } from '../../common/mongo-collection.js'; import { type CreateVerificationTokenDto, type UpdateVerificationTokenDto, type VerificationToken } from '@tmlmobilidade/types'; import { IndexDescription } from 'mongodb'; import { z } from 'zod'; declare class VerificationTokensClass extends MongoCollectionClass<VerificationToken, CreateVerificationTokenDto, UpdateVerificationTokenDto> { private static _instance; protected createSchema: z.ZodSchema; protected updateSchema: z.ZodSchema; private constructor(); static getInstance(): Promise<VerificationTokensClass>; /** * Finds a verification token by its token. * @param token The token to find. * @returns The verification token or null if not found. */ findByToken(token: string): Promise<import("mongodb").WithId<{ _id: string; created_at: number & { __brand: "UnixTimestamp"; }; created_by: string | null; updated_at: number & { __brand: "UnixTimestamp"; }; expires_at: number & { __brand: "UnixTimestamp"; }; token: string; user_id: string; updated_by?: string | undefined; }>>; protected getCollectionIndexes(): IndexDescription[]; protected getCollectionName(): string; protected getEnvName(): string; } /** * @deprecated This class is deprecated and will be removed in the future. * Use `@tmlmobilidade/go-interfaces-go-db` instead. */ export declare const verificationTokens: VerificationTokensClass; export {};