ObjectStackObjectStack

License

License protocol schemas

Metric Type Classification

Source: packages/spec/src/system/license.zod.ts

TypeScript Usage

import { Feature, License, LicenseMetricType, Plan } from '@objectstack/spec/system';
import type { Feature, License, LicenseMetricType, Plan } from '@objectstack/spec/system';

// Validate data
const result = Feature.parse(data);

Feature

Properties

PropertyTypeRequiredDescription
codestringFeature code (e.g. core.api_access)
labelstring
descriptionstringoptional
typeEnum<'boolean' | 'counter' | 'gauge'>License metric type
unitEnum<'count' | 'bytes' | 'seconds' | 'percent'>optional
requiresstring[]optional

License

Properties

PropertyTypeRequiredDescription
spaceIdstringTarget Space ID
planCodestring
issuedAtstring
expiresAtstringoptional
statusEnum<'active' | 'expired' | 'suspended' | 'trial'>
customFeaturesstring[]optional
customLimitsRecord<string, number>optional
pluginsstring[]optionalList of enabled plugin package IDs
signaturestringoptionalCryptographic signature of the license

LicenseMetricType

License metric type

Allowed Values

  • boolean
  • counter
  • gauge

Plan

Properties

PropertyTypeRequiredDescription
codestringPlan code (e.g. pro_v1)
labelstring
activeboolean
featuresstring[]List of enabled boolean features
limitsRecord<string, number>Map of metric codes to limit values (e.g. { storage_gb: 10 })
currencystringoptional
priceMonthlynumberoptional
priceYearlynumberoptional

On this page