/** * AstermindLicense - MUI-style synchronous license loading. * * This is in a separate file to avoid export conflicts with re-exports from @astermind/astermind-pro. */ /** * AstermindLicense - MUI-style synchronous license loading. * * This class provides a simple, synchronous API for loading licenses * that mirrors MUI's LicenseInfo pattern: * * ```typescript * // BEFORE React imports (like MUI) * import { AstermindLicense } from '@astermind/astermind-premium'; * AstermindLicense.setLicenseKeys([token1, token2]); * * // THEN React imports * import React from 'react'; * ``` * * The synchronous approach: * - Parses tokens immediately (base64 decode) * - Checks expiry synchronously * - Extracts features into the unified registry * - Does NOT perform crypto signature validation at load time * * This matches MUI's philosophy: validate format/expiry at startup, * defer expensive crypto operations. */ export declare class AstermindLicense { /** * Set multiple license keys synchronously. * Clears existing licenses and adds all provided tokens. * * This is the primary API for MUI-style license loading. * * @param tokens - Array of JWT license tokens * * @example * ```typescript * import { AstermindLicense } from '@astermind/astermind-premium'; * * AstermindLicense.setLicenseKeys([ * premiumToken, // aud: astermind-premium * ragToken, // aud: astermind-rag * translatorToken // aud: astermind-universal-translator * ]); * ``` */ static setLicenseKeys(tokens: string[]): void; /** * Check if a feature/product code is licensed. * * @param productCode - Product code to check (e.g., 'astermind-premium') * @returns true if the feature is available */ static hasFeature(productCode: string): boolean; /** * Get all licensed features from the unified registry. * * @returns Array of all licensed product codes */ static getAllFeatures(): string[]; /** * Check if any licenses have been loaded. * * @returns true if at least one license is loaded */ static isInitialized(): boolean; /** * Clear all loaded licenses. */ static clear(): void; /** * Add license keys without clearing existing ones. * Use this when merging tokens from multiple sources. * * Unlike setLicenseKeys() which replaces all licenses, * this method adds to the existing registry. * * @param tokens - Array of JWT license tokens * @returns Number of tokens successfully added * * @example * ```typescript * // In license-config.ts (package default) * AstermindLicense.addLicenseKeys([configToken]); * * // In main.tsx (add more tokens) * AstermindLicense.addLicenseKeys([additionalToken]); * ``` */ static addLicenseKeys(tokens: string[]): number; } //# sourceMappingURL=astermind-license.d.ts.map