@mui/x-license
Version:
MUI X License verification.
30 lines • 1.27 kB
text/typescript
import { LicenseStatus } from "../utils/licenseStatus.mjs";
import type { NullableLicenseDetails } from "../utils/licenseDetails.mjs";
import { CommercialPackageInfo } from "../utils/commercialPackages.mjs";
/**
* Parse a comma-separated key=value license string into a NullableLicenseDetails object.
* Shared by v2 and v3 decoders.
*/
export declare function parseLicenseTokens(license: string, licenseInfo: NullableLicenseDetails): void;
/**
* Format: O=${orderNumber},E=${expiryTimestamp},S=${planScope},LM=${licenseModel},PV=${planVersion},KV=2
*/
export declare function decodeLicenseVersion2(license: string): NullableLicenseDetails;
/**
* Format: O=${orderNumber},E=${expiryTimestamp},S=${planScope},LM=${licenseModel},PV=${planVersion},Q=${quantity},AT=${appType},KV=3
*/
export declare function decodeLicenseVersion3(license: string): NullableLicenseDetails;
/**
* Decode the license based on its key version and return a version-agnostic `NullableLicenseDetails` object.
*/
export declare function decodeLicense(encodedLicense: string): NullableLicenseDetails | null;
export declare function verifyLicense({
packageInfo,
licenseKey
}: {
packageInfo: CommercialPackageInfo;
licenseKey?: string;
}): {
status: LicenseStatus;
meta?: any;
};