@thumbmarkjs/thumbmarkjs
Version:
   • 1.12 kB
TypeScript
import { optionsInterface } from "./options";
import { ThumbmarkResponse } from './functions';
import { componentInterface } from "./factory";
/**
* A client for generating thumbmarks with a persistent configuration.
*/
export declare class Thumbmark {
private options;
private customComponents;
/**
* Creates a new Thumbmarker client instance.
* @param options - Default configuration options for this instance.
*/
constructor(options?: optionsInterface);
/**
* Generates a thumbmark using the instance's configuration.
* @param overrideOptions - Options to override for this specific call.
* @returns The thumbmark result containing the fingerprint hash, components, and metadata.
*/
get(overrideOptions?: optionsInterface): Promise<ThumbmarkResponse>;
getVersion(): string;
/**
* Register a custom component to be included in the fingerprint.
* @param key - The component name
* @param fn - The component function
*/
includeComponent(key: string, fn: (options?: optionsInterface) => Promise<componentInterface | null>): void;
}