Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.47 KB

File metadata and controls

56 lines (38 loc) · 1.47 KB
title Feature
description Feature protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Feature Rollout Strategy

**Source:** `packages/spec/src/kernel/feature.zod.ts`

TypeScript Usage

import { FeatureFlag, FeatureStrategy } from '@objectstack/spec/kernel';
import type { FeatureFlag, FeatureStrategy } from '@objectstack/spec/kernel';

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

FeatureFlag

Properties

Property Type Required Description
name string Feature key (snake_case)
label string optional Display label
description string optional
enabled boolean optional Is globally enabled
strategy Enum<'boolean' | 'percentage' | 'user_list' | 'group' | 'custom'> optional
conditions { percentage?: number; users?: string[]; groups?: string[]; expression?: string | { dialect: Enum<'cel' | 'cron' | 'template'>; source?: string; ast?: any; meta?: object } } optional
environment Enum<'dev' | 'staging' | 'prod' | 'all'> optional Environment validity
expiresAt string optional Feature flag expiration date

FeatureStrategy

Allowed Values

  • boolean
  • percentage
  • user_list
  • group
  • custom