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.
Synchronize nutrition records from provider sources.
Goal
Keep canonical nutrition records synchronized across connectors.
Context
Triggered by incremental sync jobs and manual refresh actions.
Source Definition
import {
type AnyOperationSpec,
defineCommand,
defineQuery,
} from '@lssm-tech/lib.contracts-spec/operations';
import type { OperationSpecRegistry } from '@lssm-tech/lib.contracts-spec/operations/registry';
import { ScalarTypeEnum, SchemaModel } from '@lssm-tech/lib.schema';
import { HealthNutritionRecord } from '../models';
import { HEALTH_TELEMETRY_EVENTS } from '../telemetry';
export const HealthSyncNutrition = defineCommand({
meta: {
key: 'health.nutrition.sync',
version: '1.0.0',
description: 'Synchronize nutrition records from provider sources.',
goal: 'Keep canonical nutrition records synchronized across connectors.',
context: 'Triggered by incremental sync jobs and manual refresh actions.',
owners: ['@platform.integrations'],
tags: ['health', 'nutrition', 'wearables'],
stability: 'experimental',
},
io: {
input: HealthSyncNutritionInput,
output: HealthSyncNutritionOutput,
},
policy: {
auth: 'admin',
},
telemetry: {
success: {
event: { key: HEALTH_TELEMETRY_EVENTS.nutritionSynced },
},
failure: {
event: { key: HEALTH_TELEMETRY_EVENTS.nutritionSyncFailed },
},
},
});