Skip to main content

Feature Flag

Source: src/data/feature-flag/

Service

The feature-flag service is a stub (export {}). Not yet implemented.

Repository

FeatureFlagRepository

MethodParametersReturns
getById(ctx: RequestContext, id: string)Promise<FeatureFlagRecord | null>
listByTenant(ctx: RequestContext)Promise<FeatureFlagRecord[]>
create(ctx: RequestContext, record: FeatureFlagRecord)Promise<void>
update(ctx: RequestContext, id: string, patch: Partial<Omit<FeatureFlagRecord, 'id' | 'tenantId'>>)Promise<FeatureFlagRecord>
delete(ctx: RequestContext, id: string)Promise<void>

FeatureFlagRecord

FieldType
idstring
tenantIdstring
createdAtDate
updatedAtDate
dataRecord<string, unknown> (optional)

Validators

featureFlagScopeSchema

Enum: system, tenant

featureFlagSchema

FieldTypeRequiredDefault
keystringYes
scopefeatureFlagScopeSchemaYes
tenantIdstringNo
enabledbooleanYes
payloadRecord<string, unknown>No
createdAtDate (coerced)Yes
updatedAtDate (coerced)Yes

Inferred Types

  • FeatureFlagz.infer<typeof featureFlagSchema>