import { TLicenseContext } from "../../types/LicenseContext"; import { ILicenseInfo } from "../../types/licensingClasses"; import { SciChartSurfaceBase } from "./SciChartSurfaceBase"; export declare type TLicenseDependencies = { fetchFromWizard: (url: string) => Promise; setCookie: (name: string, val: string, validDays: number) => void; getCookie: (name: string) => string; fetchForChallenge: (url: string) => Promise; /** Reads the initial page-load token. Default implementation reads the * tag from the document. Return null to * fall through to the normal challenge flow. */ getInitialToken: () => string | null; /** Generates a token synchronously, bypassing the HTTP round-trip. Default * implementation returns null. Return null from a custom implementation to * use fetchForChallenge instead. */ generateSimpleToken: (orderId: string) => string | null; }; export declare const setDependencies: (dependencies: TLicenseDependencies) => TLicenseDependencies; export declare const setIsDebugLicensing: (value: boolean, persist?: boolean) => void; export declare type TLogLevel = 'none' | 'info' | 'debug'; export declare type TOutputMode = 'none' | 'console' | 'localStorage'; export interface ILogEntry { timestamp: number; level: 'info' | 'debug'; message: string; } /** @internal exported for testing */ export declare const logInfo: (message: string) => void; /** @internal exported for testing */ export declare const debug: (message: string) => void; export declare const getLicenseLog: () => ILogEntry[]; export declare const setLicenseCallback: (callback: (queryString: string) => Promise) => void; export declare const setRuntimeLicenseKey: (value: string) => void; export declare const setUseLicenseWizard: (value: boolean) => void; interface ILicenseCookie { key: string; token: string; expiry: Date; lastValidated: Date; } export declare const getLicenseCookie: () => ILicenseCookie; export declare const applyLicense: (licenseContext: TLicenseContext, source: string) => void; export declare const getLicenseInfo: (licenseContext: TLicenseContext) => ILicenseInfo; export declare const licenseManager: { clear: () => void; cancelChallenge: () => void; /** @internal For unit tests only (no-op unless TEST_ENV=1). */ resetCheckStatus: () => void; setRuntimeLicenseKey: (value: string) => void; setIsDebugLicensing: (value: boolean) => void; setLicenseCallback: (callback: (queryString: string) => Promise) => void; setServerLicenseEndpoint: (value: string) => void; applyLicense: (licenseContext: TLicenseContext, source: string) => void; updateLicenseDisplay: (sciChartSurface: SciChartSurfaceBase) => void; getLicenseLog: () => ILogEntry[]; clearLogs: () => void; logLevel: TLogLevel; outputMode: TOutputMode; emitLog: (entry: ILogEntry) => void; }; export {};