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.

health.sleep.sync

Synchronize sleep intervals from connected providers.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: experimental
  • Owners: @platform.integrations
  • Tags: health, sleep, wearables
  • field.key.label
    health.sleep.sync
    field.version.label
    1.0.0
    field.type.label
    operation (command)
    field.title.label
    health.sleep.sync
    field.description.label

    Synchronize sleep intervals from connected providers.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: experimental
  • Owners: @platform.integrations
  • Tags: health, sleep, wearables
  • field.tags.label
    health,sleep,wearables
    field.owners.label
    @platform.integrations
    field.stability.label
    experimental

    Synchronize sleep intervals from connected providers.

    Goal

    Keep canonical sleep records aligned with upstream provider data.

    Context

    Triggered by scheduled jobs or manual refresh in health surfaces.

    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 { HealthSleepRecord } from '../models';
    import { HEALTH_TELEMETRY_EVENTS } from '../telemetry';
    
    export const HealthSyncSleep = defineCommand({
    	meta: {
    		key: 'health.sleep.sync',
    		version: '1.0.0',
    		description: 'Synchronize sleep intervals from connected providers.',
    		goal: 'Keep canonical sleep records aligned with upstream provider data.',
    		context:
    			'Triggered by scheduled jobs or manual refresh in health surfaces.',
    		owners: ['@platform.integrations'],
    		tags: ['health', 'sleep', 'wearables'],
    		stability: 'experimental',
    	},
    	io: {
    		input: HealthSyncSleepInput,
    		output: HealthSyncSleepOutput,
    	},
    	policy: {
    		auth: 'admin',
    	},
    	telemetry: {
    		success: {
    			event: { key: HEALTH_TELEMETRY_EVENTS.sleepSynced },
    		},
    		failure: {
    			event: { key: HEALTH_TELEMETRY_EVENTS.sleepSyncFailed },
    		},
    	},
    });