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.
Update a metric definition.
Goal
Modify metric configuration.
Context
Called when updating metric settings.
Source Definition
import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
export const UpdateMetricContract = defineCommand({
meta: {
key: 'metric.update',
version: '1.0.0',
stability: 'stable',
owners: ['platform.metering'],
tags: ['metering', 'metric', 'update'],
description: 'Update a metric definition.',
goal: 'Modify metric configuration.',
context: 'Called when updating metric settings.',
},
io: {
input: UpdateMetricInput,
output: MetricDefinitionModel,
errors: {
METRIC_NOT_FOUND: {
description: 'Metric does not exist',
http: 404,
gqlCode: 'METRIC_NOT_FOUND',
when: 'Metric ID is invalid',
},
},
},
policy: {
auth: 'admin',
},
});