OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Delete a targeting rule.
Goal
Remove a targeting rule from a flag.
Context
Called when removing targeting conditions.
Source Definition
import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
export const DeleteRuleContract = defineCommand({
meta: {
key: 'flag.rule.delete',
version: '1.0.0',
stability: 'stable',
owners: ['platform.feature-flags'],
tags: ['feature-flags', 'rule', 'delete'],
description: 'Delete a targeting rule.',
goal: 'Remove a targeting rule from a flag.',
context: 'Called when removing targeting conditions.',
},
io: {
input: DeleteRuleInput,
output: SuccessOutput,
errors: {
RULE_NOT_FOUND: {
description: 'Rule does not exist',
http: 404,
gqlCode: 'RULE_NOT_FOUND',
when: 'Rule ID is invalid',
},
},
},
policy: {
auth: 'admin',
},
});