/** * License API Service * * License activation, deactivation, and feature checking */ import { api } from './api'; import type { LicenseInfo, LicenseActivationResponse, LicenseDeactivationResponse, FeatureCheckResponse, } from '../types/license'; /** * Get license information */ export async function getLicenseInfo(): Promise<{ success: boolean; data: LicenseInfo }> { const response = await api.get('/license/info'); return response.data; } /** * Activate license key */ export async function activateLicense( licenseKey: string ): Promise { const response = await api.post('/license/activate', { license_key: licenseKey, }); return response.data; } /** * Deactivate license key */ export async function deactivateLicense(): Promise { const response = await api.post('/license/deactivate'); return response.data; } /** * Check if a specific feature is available */ export async function checkFeature( feature: string ): Promise { const response = await api.get('/license/check-feature', { params: { feature }, }); return response.data; }