{"version":3,"sources":["../src/format-schema.ts","../src/examples/index.ts","../src/examples/step.ts","../src/dev.ts"],"sourcesContent":["import type { JsonSchema } from './types';\n\n/**\n * Pre-compiled JSON Schema for WalkerOS.Event structure validation.\n * Validates that all required fields exist with correct types.\n */\nexport const formatSchema: JsonSchema = {\n  type: 'object',\n  required: [\n    'name',\n    'entity',\n    'action',\n    'data',\n    'globals',\n    'custom',\n    'user',\n    'consent',\n    'id',\n    'trigger',\n    'timestamp',\n    'timing',\n    'source',\n  ],\n  properties: {\n    name: { type: 'string', pattern: '^\\\\S+ \\\\S+$' }, // \"entity action\"\n    entity: { type: 'string' },\n    action: { type: 'string' },\n    data: { type: 'object' },\n    context: { type: 'object' },\n    globals: { type: 'object' },\n    custom: { type: 'object' },\n    user: { type: 'object' },\n    nested: { type: 'array' },\n    consent: { type: 'object' },\n    id: { type: 'string' },\n    trigger: { type: 'string' },\n    timestamp: { type: 'number' },\n    timing: { type: 'number' },\n    source: {\n      type: 'object',\n      required: ['type'],\n      properties: {\n        type: { type: 'string' },\n        platform: { type: 'string' },\n        url: { type: 'string' },\n        referrer: { type: 'string' },\n        schema: { type: 'string' },\n        version: { type: 'string' },\n        count: { type: 'number' },\n        trace: { type: 'string' },\n        tool: { type: 'string' },\n        command: { type: 'string' },\n      },\n    },\n  },\n};\n","export * as step from './step';\n","import type { Flow } from '@walkeros/core';\nimport { getEvent } from '@walkeros/core';\n\nexport const validEvent: Flow.StepExample = {\n  title: 'Valid event',\n  description:\n    'A well-formed product view passes validation and is returned unchanged for downstream destinations.',\n  in: getEvent('product view', {\n    id: 'ev-1700000700',\n    timestamp: 1700000700,\n    data: { id: 'SKU-100', name: 'Trail Runner Pro', price: 129.99 },\n    source: { type: 'browser', platform: 'web', url: 'https://example.com/' },\n  }),\n  out: [\n    [\n      'return',\n      getEvent('product view', {\n        id: 'ev-1700000700',\n        timestamp: 1700000700,\n        data: { id: 'SKU-100', name: 'Trail Runner Pro', price: 129.99 },\n        source: {\n          type: 'browser',\n          platform: 'web',\n          url: 'https://example.com/',\n        },\n      }),\n    ],\n  ],\n};\n\nexport const invalidFormat: Flow.StepExample = {\n  public: false,\n  in: {\n    name: 'invalid',\n    data: {},\n  },\n  out: [['return', false]],\n};\n\nexport const contractValidationPass: Flow.StepExample = {\n  title: 'Contract validation',\n  description:\n    'Contract validation passes when event data matches the entity.action JSON Schema',\n  in: getEvent('order complete', {\n    id: 'ev-1700000800',\n    timestamp: 1700000800,\n    data: { id: '0rd3r1d', total: 555, currency: 'EUR' },\n    source: {\n      type: 'browser',\n      platform: 'web',\n      url: 'https://shop.example.com/',\n    },\n  }),\n  out: [\n    [\n      'return',\n      getEvent('order complete', {\n        id: 'ev-1700000800',\n        timestamp: 1700000800,\n        data: { id: '0rd3r1d', total: 555, currency: 'EUR' },\n        source: {\n          type: 'browser',\n          platform: 'web',\n          url: 'https://shop.example.com/',\n        },\n      }),\n    ],\n  ],\n};\n","/**\n * Development exports for transformer-validator\n * Used by website documentation and examples\n */\nimport { formatSchema } from './format-schema';\nimport type { JsonSchema } from './types';\n\nexport { formatSchema };\n\n/**\n * JSON Schema describing ValidatorSettings for documentation.\n */\nexport const settingsSchema: JsonSchema = {\n  type: 'object',\n  properties: {\n    format: {\n      type: 'boolean',\n      description:\n        'Validate full WalkerOS.Event structure. Pre-compiled at init.',\n      default: true,\n    },\n    contract: {\n      type: 'object',\n      description:\n        'Event-specific validation rules. Entity/action keyed, supports wildcards.',\n    },\n  },\n};\n\n// Re-export for convenience\nexport const schemas: { format: JsonSchema; settings: JsonSchema } = {\n  format: formatSchema,\n  settings: settingsSchema,\n};\n\nexport * as examples from './examples';\n"],"mappings":";;;;;;;AAMO,IAAM,eAA2B;AAAA,EACtC,MAAM;AAAA,EACN,UAAU;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,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