Skip to content

Licensing ​

Datastripes forecasting is always available; entitlement (unlimited rows, exports, no watermark) is granted by a remote licensing server you point the library at.

Configuring a license ​

Pass apiKey and apiUrl to any wrapper (or to executeForecast/checkLicense directly from @datastripes/forecast):

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

const status = await checkLicense({
  apiKey: 'your-key',
  apiUrl: 'https://licensing.example.com',
  domain: 'app.example.com'
});

The client calls GET {apiUrl}/v1/license/check?domain=<domain> with Authorization: Bearer <apiKey>, expecting a JSON body shaped like:

json
{ "valid": true, "plan": "enterprise", "expiresAt": "2030-01-01T00:00:00Z", "maxRows": null }

The safe default: trial tier ​

If apiKey or apiUrl is omitted, the request fails, or the server reports the license as invalid or expired, checkLicense returns a restricted trial-tier result:

  • isValid: false
  • plan: 'trial'
  • maxHistoricalRows: 1000
  • canExport: false
  • showWatermark: true

There is no local fallback to an "enterprise" or "free developer" unlocked mode, only a successful response from your licensing server grants full entitlement. This is a deliberate security property: earlier internal builds of this library shipped a client-side key generator and a default free-tier-unlocked fallback, both of which have been removed.