open-index/open-npm huggingface dataset:
npm package: @knot0/event-types
Description: TypeScript types for Knot0 event payloads (generated from JSON Schemas)
Latest version: 2.0.34

@knot0/event-types

TypeScript types for Knot0 CloudEvents payloads, generated from JSON Schemas in `schemas-v2/events/**`.

Install
```
npm i @knot0/event-types
```

Usage
```
import type { CloudEvent } from '@knot0/event-types';
import type { OrchestrationWorkflowStartedPayload } from '@knot0/event-types';

const evt: CloudEvent<OrchestrationWorkflowStartedPayload> = {
  specversion: '1.0',
  type: 'v1.orchestration.workflow.started',
  source: 'orchestration-service',
  id: '...',
  datacontenttype: 'application/json',
  dataschema: 'https://knot0.dev/schemas/events/v1/orchestration/workflow.started.schema.json',
  data: {
    workflow_id: '...',
    workspace_id: '...',
    workflow_type: 'verification',
    context: {},
    started_at: new Date().toISOString()
  }
};
```

Notes
- Types are generated; do not edit under `src/`.
- The `CloudEvent<T>` interface is provided for envelope typing only; runtime validation should use JSON Schemas (e.g., `@knot0/event-schemas`).