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.

learning.onboarding.recordEvent

Record a domain event to evaluate onboarding step completion conditions.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Tags: learning, onboarding, events
  • File: packages/modules/learning-journey/src/contracts/onboarding.ts
  • field.key.label
    learning.onboarding.recordEvent
    field.version.label
    1.0.0
    field.type.label
    operation (command)
    field.title.label
    learning.onboarding.recordEvent
    field.description.label

    Record a domain event to evaluate onboarding step completion conditions.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Tags: learning, onboarding, events
  • File: packages/modules/learning-journey/src/contracts/onboarding.ts
  • field.tags.label
    learning,onboarding,events
    field.owners.label
    field.stability.label
    stable

    Record a domain event to evaluate onboarding step completion conditions.

    Goal

    Advance onboarding automatically from product events.

    Context

    Called by event bus handlers when relevant product events fire (e.g., deal.created).

    Source Definition

    export const RecordOnboardingEventContract = defineCommand({
    	meta: {
    		key: 'learning.onboarding.recordEvent',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: [...LEARNING_JOURNEY_OWNERS],
    		tags: ['learning', 'onboarding', 'events'],
    		description:
    			'Record a domain event to evaluate onboarding step completion conditions.',
    		goal: 'Advance onboarding automatically from product events.',
    		context:
    			'Called by event bus handlers when relevant product events fire (e.g., deal.created).',
    	},
    	io: {
    		input: RecordOnboardingEventInput,
    		output: SuccessOutput,
    		errors: {
    			TRACK_NOT_FOUND: {
    				description: 'Track not found for event routing',
    				http: 404,
    				gqlCode: 'TRACK_NOT_FOUND',
    				when: 'Track ID or routing context is invalid',
    			},
    			STEP_NOT_FOUND: {
    				description: 'Step not found for completion condition',
    				http: 404,
    				gqlCode: 'STEP_NOT_FOUND',
    				when: 'No step matches the incoming event',
    			},
    		},
    	},
    	policy: {
    		auth: 'user',
    	},
    });