@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.
28 lines (27 loc) • 1.19 kB
TypeScript
import { MongoCollectionClass } from '../../mongo-collection.js';
import { CreateVerificationTokenDto, UpdateVerificationTokenDto, VerificationToken } from '@tmlmobilidade/types';
import { IndexDescription, UpdateResult } 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<VerificationToken> | null>;
/**
* Disable Update Many
*/
updateMany(): Promise<UpdateResult<VerificationToken>>;
protected getCollectionIndexes(): IndexDescription[];
protected getCollectionName(): string;
protected getEnvName(): string;
}
export declare const verificationTokens: VerificationTokensClass;
export {};