@kontent-ai/smart-link
Version:
Kontent.ai Smart Link SDK allowing to automatically inject [smart links](https://docs.kontent.ai/tutorials/develop-apps/build-strong-foundation/set-up-editing-from-preview#a-using-smart-links) to Kontent.ai according to manually specified [HTML data attri
19 lines (18 loc) • 1.04 kB
TypeScript
import { type KontentSmartLinkEventMap } from "./sdk";
import type { KSLPublicConfiguration } from "./utils/configuration";
/**
* KontentSmartLink is the main entry point for the Kontent Smart Link SDK.
* It provides a singleton wrapper around the SDK instance to manage initialization,
* configuration updates, and cleanup while maintaining a consistent API for users.
*/
declare class KontentSmartLink {
private static instance;
private sdk;
static initializeOnLoad(configuration?: Partial<KSLPublicConfiguration>): Promise<KontentSmartLink>;
static initialize(configuration?: Partial<KSLPublicConfiguration>): KontentSmartLink;
destroy: () => void;
setConfiguration: (configuration: Partial<KSLPublicConfiguration>) => void;
on: <TEvent extends keyof KontentSmartLinkEventMap>(event: TEvent, handler: KontentSmartLinkEventMap[TEvent]) => void;
off: <TEvent extends keyof KontentSmartLinkEventMap>(event: TEvent, handler: KontentSmartLinkEventMap[TEvent]) => void;
}
export default KontentSmartLink;