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.

metric.delete

Delete a metric definition.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: platform.metering
  • Tags: metering, metric, delete
  • File: packages/libs/metering/src/contracts/index.ts
  • field.key.label
    metric.delete
    field.version.label
    1.0.0
    field.type.label
    operation (command)
    field.title.label
    metric.delete
    field.description.label

    Delete a metric definition.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: platform.metering
  • Tags: metering, metric, delete
  • File: packages/libs/metering/src/contracts/index.ts
  • field.tags.label
    metering,metric,delete
    field.owners.label
    platform.metering
    field.stability.label
    stable

    Delete a metric definition.

    Goal

    Remove a metric and its data.

    Context

    Called when removing a metric.

    Source Definition

    import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
    import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
    
    export const DeleteMetricContract = defineCommand({
    	meta: {
    		key: 'metric.delete',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['platform.metering'],
    		tags: ['metering', 'metric', 'delete'],
    		description: 'Delete a metric definition.',
    		goal: 'Remove a metric and its data.',
    		context: 'Called when removing a metric.',
    	},
    	io: {
    		input: DeleteMetricInput,
    		output: SuccessOutput,
    		errors: {
    			METRIC_NOT_FOUND: {
    				description: 'Metric does not exist',
    				http: 404,
    				gqlCode: 'METRIC_NOT_FOUND',
    				when: 'Metric ID is invalid',
    			},
    		},
    	},
    	policy: {
    		auth: 'admin',
    	},
    });