import { TagBuilder } from './TagBuilder'; type UuidVersion = "v1" | "v4" | "v6" | "v7" | "v8"; export type OtpStyle = 'number' | 'alpha' | 'mixed'; /** * Generator Utility Class * A static toolkit for creating and verifying structured, * formula-based identifiers and hashes. */ export declare class Generator { private static readonly upperPool; private static readonly lowerPool; private static readonly numberPool; private static readonly symbolPool; private static lastTimestamp; private static sequence; private static workerId; /** * Generates a standard barcode string (Code 128 style). * This simply ensures the input is alphanumeric and follows a set length. */ static barcode(data: string, length?: number): string; /** * Generates a Message ID (e.g., 'T-A1B2CRIF90') with a 6:4 letter-to-number ratio. * @param letter Prefix character * @param input String ingredient to seed the randomness */ static messageId(letter: string, input: string): string; /** * Generates a unique numeric ID using Timestamp + Salt + Luhn Check. * @param length Total length including check digit (default 12) */ static generate(length?: number): string; /** * Creates an App ID: [Index]:[ProjectID]:[Category]:[Hash] */ static appId(projectId: string, category: string): string; /** * Generates a deterministic 5-digit item number from a product name. * The same name will always produce the same number. */ static itemNumber(productName: string): string; /** * Generates a valid 12-digit UPC-A string. * @param base Optional 11-digit numeric string */ static upc(base?: string): string; /** * Validates a 12-digit UPC-A string. */ static isValidUPC(upc: string): boolean; /** * Generates a verifiable OTP. * @param length Total length (min 6 recommended) * @param options Style selection ('number', 'alpha', or 'mixed') */ static otp(length?: number, options?: { style: OtpStyle; uppercase?: boolean; }): string; /** * Verifies the OTP, its checksum, and its expiration. */ static verifyOtp(code: string, createdAt?: number | Date, ttlSeconds?: number): boolean; /** * Generates a complex random password. * @param length The total length of the password (default 12) */ static password(length?: number): string; /** * Generates a deterministic numeric string of a specific length from an input. * Useful for caching keys or deterministic IDs. */ static numericHash(input: string, length?: number): string; /** * Generates a custom formatted ID. #: num, A: upper, a: lower, !: sym, ?: mix. */ static format(pattern: string): string; static createHash(len?: number): string; static verifyAppId(id: string): boolean; static verifyHash(hash: string): boolean; /** * Verifies if a formatted ID matches its internal checksum. */ static verifyFormat(formattedId: string): boolean; private static calculateOtpChecksum; private static calculateHashChecksum; private static calculateLuhnCheckDigit; private static isValidProjectId; /** * Internal helper for weighted UPC checksum */ private static calculateUPCCheckDigit; private static fillPool; /** * @deprecated Use the fluent API instead: Generator.tag(length, { style }).start().build() * This signature will be removed in future versions. */ static tag(item: string): string; /** * Fluent Tag Generator * Usage: Generator.tag(9, {style: 'letter'}).start("Blue").build() */ static tag(length: number, options: { style: 'letter' | 'number' | 'mixed'; }): TagBuilder; static uuid(version?: UuidVersion): string; /** * @deprecated use Generator.generate or Generator.tag * @param len the length of the base code to be returned * @returns */ static transactionId(length?: number): string; private static _ranBetween; private static _sumOf; private static _transactionKey; } export {}; //# sourceMappingURL=Generator.d.ts.map