@alfadesmeta/nocodecart-cli
Version:
CLI tool for installing NoCodeCart premium templates and components in FlutterFlow projects
51 lines (50 loc) • 1.36 kB
TypeScript
interface StoredLicenseMetadata {
command: string;
variantName: string;
variantId: string;
benefitId: string;
platform: string;
hostname: string;
activationDate: string;
lastValidated?: string;
systemInfo?: {
os: string;
platform: string;
arch: string;
release: string;
memory: string;
cpu: string;
};
}
interface StoredLicense {
licenseKey: string;
activationId: string;
organizationId: string;
metadata: StoredLicenseMetadata;
expiresAt: string | null;
usageCount: number;
activationLimit: number | null;
}
export declare class LicenseStore {
private readonly storePath;
private readonly storeDir;
constructor();
private bytesToGB;
private getSystemInfo;
private ensureStoreExists;
private validateLicenseData;
storeLicense(license: StoredLicense): Promise<void>;
getLicense(): Promise<StoredLicense | null>;
removeLicense(): Promise<void>;
updateLastValidated(lastValidated?: Date): Promise<void>;
isLicenseStored(): Promise<boolean>;
getStoredLicenseInfo(): Promise<{
command: string;
variant: string;
activatedAt: Date;
expiresAt?: Date;
lastValidated?: Date;
systemInfo?: StoredLicenseMetadata['systemInfo'];
} | null>;
}
export {};