Licensing

Delegates every entitlement decision to a remote licensing server. The module contains no key-generation logic, no embedded secrets, and no locally-granted "enterprise" default — the safe default for any caller that omits credentials, or whose request fails, is a restricted trial tier.

The trial tier

Without a valid apiKey (or before the async check resolves), every dashboard runs at:

FieldTrial value
maxHistoricalRows1,000 — the dataset is silently truncated to the first 1,000 rows
canExportfalse — the PDF export button is disabled
showWatermarktrue — a banner states the row cap and that export is off

The row cap lives in DashboardStore itself, not in any one framework wrapper — so it applies identically whether you're using React, Vue, Angular, or the custom element. A dashboard always starts at this safe default and only loosens once a license check actually resolves successfully; a slow or failed check never lets more rows through.

Checking a license

ts
import { checkLicense } from '@datastripes/dashboard';

const license = await checkLicense({ apiKey: 'ds_live_...' });
// { isValid, plan, maxHistoricalRows, canExport, showWatermark, ... }

store.setLicense(license); // re-caps the dataset and re-renders

Every framework wrapper does this automatically from its apiKey prop/attribute — you only need to call it yourself if you're driving DashboardStore directly (see DashboardStore).

Gated features

On the React entry, a trial (invalid) license additionally locks:

Everyday chart types (line, area, bar, pie, donut, scatter, radar, treemap, sunburst, …) remain available on trial — a free user can still build a full dashboard.

LicenseValidationResult

ts
interface LicenseValidationResult {
  isValid: boolean;
  licenseKey: string;
  domain: string;
  isHostMatch: boolean;
  isExpired: boolean;
  expiresAt: string | null;
  plan: 'trial' | 'pro' | 'enterprise';
  customerName?: string;
  maxHistoricalRows: number;   // Infinity on a valid license
  canExport: boolean;
  showWatermark: boolean;
  tamperDetected: boolean;
  hashDigest: string;
}