import type { EntitlementKeyData, LicenseGrants } from './types'; /** * The grants shared by every non-entitlement license state: a valid legacy * commercial key, a legacy expired key, the non-commercial key, a missing key, * an invalid key, or an unreadable entitlement key. Every query short-circuits * on `unrestricted`, so these keys unlock everything - introducing capability * gating can never take a feature away from an existing customer. Frozen so it * cannot be mutated by a consumer. * * @type {LicenseGrants} */ export declare const UNRESTRICTED_GRANTS: LicenseGrants; /** * Builds the grants facet from a verified entitlement key: exactly the * capability tokens the payload lists, per product. Entitlement keys are never * unrestricted - they unlock only what they name. * * @param {EntitlementKeyData} keyData The verified key data. * @returns {LicenseGrants} */ export declare function getLicenseGrants(keyData: EntitlementKeyData): LicenseGrants; /** * Tells whether the license grants a product. An unrestricted license grants * every product; an entitlement license grants a product only when its payload * lists it. * * @param {LicenseGrants} grants The resolved grants. * @param {string} productName The product to check. * @returns {boolean} */ export declare function hasProductGrant(grants: LicenseGrants, productName: string): boolean; /** * Returns the capability tokens a license grants for a product, or `null` when * the product is not granted. An unrestricted license reports no token list - * it answers "granted" to every capability query instead, so a caller that * needs a yes/no answer asks `hasCapability`. * * @param {LicenseGrants} grants The resolved grants. * @param {string} productName The product to read. * @returns {string[]|null} */ export declare function getProductCapabilities(grants: LicenseGrants, productName: string): string[] | null; /** * Tells whether the license unlocks a capability for a product. An unrestricted * license unlocks every capability - even tokens that do not exist yet. An * entitlement license unlocks a capability only when its payload lists the * token for that product. * * @param {LicenseGrants} grants The resolved grants. * @param {string} productName The product the capability belongs to. * @param {string} capability The capability token to check. * @returns {boolean} */ export declare function hasCapability(grants: LicenseGrants, productName: string, capability: string): boolean;