FeatureFlagBase
Resolved document shape for a feature flag record. Combines BaseDocument (id, timestamps) with
the flag fields — a unique key, the optional kind discriminator and description, the
required defaultValue, the optional enum-style options, and the targeting rule list. Use
this type when reading flag documents from FeatureFlagService.
Definition
type FeatureFlagBase = BaseDocument & { defaultValue: JsonValue; description: string; key: string; kind: FeatureFlagKind; options: FeatureFlagOption[]; targeting: TargetingRule[] };BaseDocument & { defaultValue: JsonValue; description: string; key: string; kind: FeatureFlagKind; options: FeatureFlagOption[]; targeting: TargetingRule[] }
Example
import type { FeatureFlagBase } from '@nordcom/commerce-db';
function isEnabled(flag: FeatureFlagBase): boolean {
return flag.defaultValue === true;
}Related
FeatureFlagService ReviewService ShopService FeatureFlagOption FeatureFlagRef ResolvedCartLineTokens ResolvedProductCardTokens ResolvedShopTheme
DomainVerification
Public connection state of one routable domain, as surfaced by the admin connect screen. Legacy rows (no stored status) are coalesced by the seam to verified/se
FeatureFlagKind
Discriminator for a feature flag's intent. behavior flags toggle application logic; section flags gate whether a pershop page section renders. Absent (undefined