@walkeros/transformer-validator 3.3.0 → 3.4.0-next-1776749829492
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/dev.mjs +1 -1
- package/dist/dev.mjs.map +1 -1
- package/dist/walkerOS.json +151 -140
- package/package.json +3 -3
package/dist/dev.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,p=(e,r)=>{for(var i in r)t(e,i,{get:r[i],enumerable:!0})},
|
|
1
|
+
"use strict";var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,p=(e,r)=>{for(var i in r)t(e,i,{get:r[i],enumerable:!0})},n={};p(n,{examples:()=>s,formatSchema:()=>a,schemas:()=>g,settingsSchema:()=>l}),module.exports=(e=n,((e,p,n,a)=>{if(p&&"object"==typeof p||"function"==typeof p)for(let s of i(p))o.call(e,s)||s===n||t(e,s,{get:()=>p[s],enumerable:!(a=r(p,s))||a.enumerable});return e})(t({},"__esModule",{value:!0}),e));var a={type:"object",required:["name","entity","action","data","context","globals","custom","user","nested","consent","id","trigger","timestamp","timing","group","count","version","source"],properties:{name:{type:"string",pattern:"^\\S+ \\S+$"},entity:{type:"string"},action:{type:"string"},data:{type:"object"},context:{type:"object"},globals:{type:"object"},custom:{type:"object"},user:{type:"object"},nested:{type:"array"},consent:{type:"object"},id:{type:"string"},trigger:{type:"string"},timestamp:{type:"number"},timing:{type:"number"},group:{type:"string"},count:{type:"number"},version:{type:"object",required:["source","tagging"],properties:{source:{type:"string"},tagging:{type:"number"}}},source:{type:"object",required:["type","id","previous_id"],properties:{type:{type:"string"},id:{type:"string"},previous_id:{type:"string"}}}}},s={};p(s,{step:()=>c});var c={};p(c,{contractValidationPass:()=>y,invalidFormat:()=>m,validEvent:()=>u});var d=require("@walkeros/core"),u={in:(0,d.getEvent)("product view",{timestamp:1700000700,data:{id:"SKU-100",name:"Trail Runner Pro",price:129.99},source:{type:"web",id:"https://example.com",previous_id:""}}),out:[["return",(0,d.getEvent)("product view",{timestamp:1700000700,data:{id:"SKU-100",name:"Trail Runner Pro",price:129.99},source:{type:"web",id:"https://example.com",previous_id:""}})]]},m={in:{name:"invalid",data:{}},out:[["return",!1]]},y={description:"Contract validation passes when event data matches the entity.action JSON Schema",in:(0,d.getEvent)("order complete",{timestamp:1700000800,data:{id:"0rd3r1d",total:555,currency:"EUR"},source:{type:"web",id:"https://shop.example.com",previous_id:""}}),out:[["return",(0,d.getEvent)("order complete",{timestamp:1700000800,data:{id:"0rd3r1d",total:555,currency:"EUR"},source:{type:"web",id:"https://shop.example.com",previous_id:""}})]]},l={type:"object",properties:{format:{type:"boolean",description:"Validate full WalkerOS.Event structure. Pre-compiled at init.",default:!0},contract:{type:"object",description:"Event-specific validation rules. Entity/action keyed, supports wildcards."}}},g={format:a,settings:l};//# sourceMappingURL=dev.js.map
|
package/dist/dev.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/dev.ts","../src/format-schema.ts","../src/examples/index.ts","../src/examples/step.ts"],"sourcesContent":["/**\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","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 'context',\n 'globals',\n 'custom',\n 'user',\n 'nested',\n 'consent',\n 'id',\n 'trigger',\n 'timestamp',\n 'timing',\n 'group',\n 'count',\n 'version',\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 group: { type: 'string' },\n count: { type: 'number' },\n version: {\n type: 'object',\n required: ['source', 'tagging'],\n properties: {\n source: { type: 'string' },\n tagging: { type: 'number' },\n },\n },\n source: {\n type: 'object',\n required: ['type', 'id', 'previous_id'],\n properties: {\n type: { type: 'string' },\n id: { type: 'string' },\n previous_id: { 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 in: getEvent('product view', {\n timestamp: 1700000700,\n data: { id: 'SKU-100', name: 'Trail Runner Pro', price: 129.99 },\n source: { type: 'web', id: 'https://example.com', previous_id: '' },\n }),\n out:
|
|
1
|
+
{"version":3,"sources":["../src/dev.ts","../src/format-schema.ts","../src/examples/index.ts","../src/examples/step.ts"],"sourcesContent":["/**\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","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 'context',\n 'globals',\n 'custom',\n 'user',\n 'nested',\n 'consent',\n 'id',\n 'trigger',\n 'timestamp',\n 'timing',\n 'group',\n 'count',\n 'version',\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 group: { type: 'string' },\n count: { type: 'number' },\n version: {\n type: 'object',\n required: ['source', 'tagging'],\n properties: {\n source: { type: 'string' },\n tagging: { type: 'number' },\n },\n },\n source: {\n type: 'object',\n required: ['type', 'id', 'previous_id'],\n properties: {\n type: { type: 'string' },\n id: { type: 'string' },\n previous_id: { 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 in: getEvent('product view', {\n timestamp: 1700000700,\n data: { id: 'SKU-100', name: 'Trail Runner Pro', price: 129.99 },\n source: { type: 'web', id: 'https://example.com', previous_id: '' },\n }),\n out: [\n [\n 'return',\n getEvent('product view', {\n timestamp: 1700000700,\n data: { id: 'SKU-100', name: 'Trail Runner Pro', price: 129.99 },\n source: { type: 'web', id: 'https://example.com', previous_id: '' },\n }),\n ],\n ],\n};\n\nexport const invalidFormat: Flow.StepExample = {\n in: {\n name: 'invalid',\n data: {},\n },\n out: [['return', false]],\n};\n\nexport const contractValidationPass: Flow.StepExample = {\n description:\n 'Contract validation passes when event data matches the entity.action JSON Schema',\n in: getEvent('order complete', {\n timestamp: 1700000800,\n data: { id: '0rd3r1d', total: 555, currency: 'EUR' },\n source: { type: 'web', id: 'https://shop.example.com', previous_id: '' },\n }),\n out: [\n [\n 'return',\n getEvent('order complete', {\n timestamp: 1700000800,\n data: { id: '0rd3r1d', total: 555, currency: 'EUR' },\n source: {\n type: 'web',\n id: 'https://shop.example.com',\n previous_id: '',\n },\n }),\n ],\n ],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMO,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,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,MAAM,EAAE,MAAM,UAAU,SAAS,cAAc;AAAA;AAAA,IAC/C,QAAQ,EAAE,MAAM,SAAS;AAAA,IACzB,QAAQ,EAAE,MAAM,SAAS;AAAA,IACzB,MAAM,EAAE,MAAM,SAAS;AAAA,IACvB,SAAS,EAAE,MAAM,SAAS;AAAA,IAC1B,SAAS,EAAE,MAAM,SAAS;AAAA,IAC1B,QAAQ,EAAE,MAAM,SAAS;AAAA,IACzB,MAAM,EAAE,MAAM,SAAS;AAAA,IACvB,QAAQ,EAAE,MAAM,QA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F;AACF;AAEO,IAAM,gBAAkC;AAAA,EAC7C,IAAI;AAAA,IACF,MAAM;AAAA,IACN,MAAM,CAAC;AAAA,EACT;AAAA,EACA,KAAK,CAAC,CAAC,UAAU,KAAK,CAAC;AACzB;AAEO,IAAM,yBAA2C;AAAA,EACtD,aACE;AAAA,EACF,QAAI,sBAAS,kBAAkB;AAAA,IAC7B,WAAW;AAAA,IACX,MAAM,EAAE,IAAI,WAAW,OAAO,KAAK,UAAU,MAAM;AAAA,IACnD,QAAQ,EAAE,MAAM,OAAO,IAAI,4BAA4B,aAAa,GAAG;AAAA,EACzE,CAAC;AAAA,EACD,KAAK;AAAA,IACH;AAAA,MACE;AAAA,UACA,sBAAS,kBAAkB;AAAA,QACzB,WAAW;AAAA,QACX,MAAM,EAAE,IAAI,WAAW,OAAO,KAAK,UAAU,MAAM;AAAA,QACnD,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,IAAI;AAAA,UACJ,aAAa;AAAA,QACf;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF;;;AHvCO,IAAM,iBAA6B;AAAA,EACxC,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,aACE;AAAA,MACF,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,EACF;AACF;AAGO,IAAM,UAAwD;AAAA,EACnE,QAAQ;AAAA,EACR,UAAU;AACZ;","names":[]}
|
package/dist/dev.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=(t,r)=>{for(var i in r)e(t,i,{get:r[i],enumerable:!0})},r={type:"object",required:["name","entity","action","data","context","globals","custom","user","nested","consent","id","trigger","timestamp","timing","group","count","version","source"],properties:{name:{type:"string",pattern:"^\\S+ \\S+$"},entity:{type:"string"},action:{type:"string"},data:{type:"object"},context:{type:"object"},globals:{type:"object"},custom:{type:"object"},user:{type:"object"},nested:{type:"array"},consent:{type:"object"},id:{type:"string"},trigger:{type:"string"},timestamp:{type:"number"},timing:{type:"number"},group:{type:"string"},count:{type:"number"},version:{type:"object",required:["source","tagging"],properties:{source:{type:"string"},tagging:{type:"number"}}},source:{type:"object",required:["type","id","previous_id"],properties:{type:{type:"string"},id:{type:"string"},previous_id:{type:"string"}}}}},i={};t(i,{step:()=>o});var o={};t(o,{contractValidationPass:()=>s,invalidFormat:()=>n,validEvent:()=>a});import{getEvent as p}from"@walkeros/core";var a={in:p("product view",{timestamp:1700000700,data:{id:"SKU-100",name:"Trail Runner Pro",price:129.99},source:{type:"web",id:"https://example.com",previous_id:""}}),out:
|
|
1
|
+
var e=Object.defineProperty,t=(t,r)=>{for(var i in r)e(t,i,{get:r[i],enumerable:!0})},r={type:"object",required:["name","entity","action","data","context","globals","custom","user","nested","consent","id","trigger","timestamp","timing","group","count","version","source"],properties:{name:{type:"string",pattern:"^\\S+ \\S+$"},entity:{type:"string"},action:{type:"string"},data:{type:"object"},context:{type:"object"},globals:{type:"object"},custom:{type:"object"},user:{type:"object"},nested:{type:"array"},consent:{type:"object"},id:{type:"string"},trigger:{type:"string"},timestamp:{type:"number"},timing:{type:"number"},group:{type:"string"},count:{type:"number"},version:{type:"object",required:["source","tagging"],properties:{source:{type:"string"},tagging:{type:"number"}}},source:{type:"object",required:["type","id","previous_id"],properties:{type:{type:"string"},id:{type:"string"},previous_id:{type:"string"}}}}},i={};t(i,{step:()=>o});var o={};t(o,{contractValidationPass:()=>s,invalidFormat:()=>n,validEvent:()=>a});import{getEvent as p}from"@walkeros/core";var a={in:p("product view",{timestamp:1700000700,data:{id:"SKU-100",name:"Trail Runner Pro",price:129.99},source:{type:"web",id:"https://example.com",previous_id:""}}),out:[["return",p("product view",{timestamp:1700000700,data:{id:"SKU-100",name:"Trail Runner Pro",price:129.99},source:{type:"web",id:"https://example.com",previous_id:""}})]]},n={in:{name:"invalid",data:{}},out:[["return",!1]]},s={description:"Contract validation passes when event data matches the entity.action JSON Schema",in:p("order complete",{timestamp:1700000800,data:{id:"0rd3r1d",total:555,currency:"EUR"},source:{type:"web",id:"https://shop.example.com",previous_id:""}}),out:[["return",p("order complete",{timestamp:1700000800,data:{id:"0rd3r1d",total:555,currency:"EUR"},source:{type:"web",id:"https://shop.example.com",previous_id:""}})]]},c={type:"object",properties:{format:{type:"boolean",description:"Validate full WalkerOS.Event structure. Pre-compiled at init.",default:!0},contract:{type:"object",description:"Event-specific validation rules. Entity/action keyed, supports wildcards."}}},d={format:r,settings:c};export{i as examples,r as formatSchema,d as schemas,c as settingsSchema};//# sourceMappingURL=dev.mjs.map
|
package/dist/dev.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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 'context',\n 'globals',\n 'custom',\n 'user',\n 'nested',\n 'consent',\n 'id',\n 'trigger',\n 'timestamp',\n 'timing',\n 'group',\n 'count',\n 'version',\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 group: { type: 'string' },\n count: { type: 'number' },\n version: {\n type: 'object',\n required: ['source', 'tagging'],\n properties: {\n source: { type: 'string' },\n tagging: { type: 'number' },\n },\n },\n source: {\n type: 'object',\n required: ['type', 'id', 'previous_id'],\n properties: {\n type: { type: 'string' },\n id: { type: 'string' },\n previous_id: { 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 in: getEvent('product view', {\n timestamp: 1700000700,\n data: { id: 'SKU-100', name: 'Trail Runner Pro', price: 129.99 },\n source: { type: 'web', id: 'https://example.com', previous_id: '' },\n }),\n out:
|
|
1
|
+
{"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 'context',\n 'globals',\n 'custom',\n 'user',\n 'nested',\n 'consent',\n 'id',\n 'trigger',\n 'timestamp',\n 'timing',\n 'group',\n 'count',\n 'version',\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 group: { type: 'string' },\n count: { type: 'number' },\n version: {\n type: 'object',\n required: ['source', 'tagging'],\n properties: {\n source: { type: 'string' },\n tagging: { type: 'number' },\n },\n },\n source: {\n type: 'object',\n required: ['type', 'id', 'previous_id'],\n properties: {\n type: { type: 'string' },\n id: { type: 'string' },\n previous_id: { 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 in: getEvent('product view', {\n timestamp: 1700000700,\n data: { id: 'SKU-100', name: 'Trail Runner Pro', price: 129.99 },\n source: { type: 'web', id: 'https://example.com', previous_id: '' },\n }),\n out: [\n [\n 'return',\n getEvent('product view', {\n timestamp: 1700000700,\n data: { id: 'SKU-100', name: 'Trail Runner Pro', price: 129.99 },\n source: { type: 'web', id: 'https://example.com', previous_id: '' },\n }),\n ],\n ],\n};\n\nexport const invalidFormat: Flow.StepExample = {\n in: {\n name: 'invalid',\n data: {},\n },\n out: [['return', false]],\n};\n\nexport const contractValidationPass: Flow.StepExample = {\n description:\n 'Contract validation passes when event data matches the entity.action JSON Schema',\n in: getEvent('order complete', {\n timestamp: 1700000800,\n data: { id: '0rd3r1d', total: 555, currency: 'EUR' },\n source: { type: 'web', id: 'https://shop.example.com', previous_id: '' },\n }),\n out: [\n [\n 'return',\n getEvent('order complete', {\n timestamp: 1700000800,\n data: { id: '0rd3r1d', total: 555, currency: 'EUR' },\n source: {\n type: 'web',\n id: 'https://shop.example.com',\n previous_id: '',\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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IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,EACF;AACF;AAGO,IAAM,UAAwD;AAAA,EACnE,QAAQ;AAAA,EACR,UAAU;AACZ;","names":[]}
|
package/dist/walkerOS.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$meta": {
|
|
3
3
|
"package": "@walkeros/transformer-validator",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.4.0-next-1776749829492",
|
|
5
5
|
"type": "transformer",
|
|
6
6
|
"platform": [
|
|
7
7
|
"web",
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
"group": "gr0up",
|
|
223
223
|
"count": 1,
|
|
224
224
|
"version": {
|
|
225
|
-
"source": "3.
|
|
225
|
+
"source": "3.4.0-next-1776749829492",
|
|
226
226
|
"tagging": 1
|
|
227
227
|
},
|
|
228
228
|
"source": {
|
|
@@ -231,108 +231,116 @@
|
|
|
231
231
|
"previous_id": ""
|
|
232
232
|
}
|
|
233
233
|
},
|
|
234
|
-
"out":
|
|
235
|
-
|
|
236
|
-
"
|
|
237
|
-
|
|
238
|
-
"
|
|
239
|
-
"
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
"shopping": [
|
|
244
|
-
"complete",
|
|
245
|
-
0
|
|
246
|
-
]
|
|
247
|
-
},
|
|
248
|
-
"globals": {
|
|
249
|
-
"pagegroup": "shop"
|
|
250
|
-
},
|
|
251
|
-
"custom": {
|
|
252
|
-
"completely": "random"
|
|
253
|
-
},
|
|
254
|
-
"user": {
|
|
255
|
-
"id": "us3r",
|
|
256
|
-
"device": "c00k13",
|
|
257
|
-
"session": "s3ss10n"
|
|
258
|
-
},
|
|
259
|
-
"nested": [
|
|
260
|
-
{
|
|
261
|
-
"entity": "product",
|
|
262
|
-
"data": {
|
|
263
|
-
"id": "ers",
|
|
264
|
-
"name": "Everyday Ruck Snack",
|
|
265
|
-
"color": "black",
|
|
266
|
-
"size": "l",
|
|
267
|
-
"price": 420
|
|
268
|
-
},
|
|
269
|
-
"context": {
|
|
270
|
-
"shopping": [
|
|
271
|
-
"complete",
|
|
272
|
-
0
|
|
273
|
-
]
|
|
274
|
-
},
|
|
275
|
-
"nested": []
|
|
234
|
+
"out": [
|
|
235
|
+
[
|
|
236
|
+
"return",
|
|
237
|
+
{
|
|
238
|
+
"name": "order complete",
|
|
239
|
+
"data": {
|
|
240
|
+
"id": "0rd3r1d",
|
|
241
|
+
"total": 555,
|
|
242
|
+
"currency": "EUR"
|
|
276
243
|
},
|
|
277
|
-
{
|
|
278
|
-
"
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
"context": {
|
|
286
|
-
"shopping": [
|
|
287
|
-
"complete",
|
|
288
|
-
0
|
|
289
|
-
]
|
|
290
|
-
},
|
|
291
|
-
"nested": []
|
|
244
|
+
"context": {
|
|
245
|
+
"shopping": [
|
|
246
|
+
"complete",
|
|
247
|
+
0
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
"globals": {
|
|
251
|
+
"pagegroup": "shop"
|
|
292
252
|
},
|
|
293
|
-
{
|
|
294
|
-
"
|
|
295
|
-
|
|
296
|
-
|
|
253
|
+
"custom": {
|
|
254
|
+
"completely": "random"
|
|
255
|
+
},
|
|
256
|
+
"user": {
|
|
257
|
+
"id": "us3r",
|
|
258
|
+
"device": "c00k13",
|
|
259
|
+
"session": "s3ss10n"
|
|
260
|
+
},
|
|
261
|
+
"nested": [
|
|
262
|
+
{
|
|
263
|
+
"entity": "product",
|
|
264
|
+
"data": {
|
|
265
|
+
"id": "ers",
|
|
266
|
+
"name": "Everyday Ruck Snack",
|
|
267
|
+
"color": "black",
|
|
268
|
+
"size": "l",
|
|
269
|
+
"price": 420
|
|
270
|
+
},
|
|
271
|
+
"context": {
|
|
272
|
+
"shopping": [
|
|
273
|
+
"complete",
|
|
274
|
+
0
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
"nested": []
|
|
297
278
|
},
|
|
298
|
-
|
|
299
|
-
"
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
279
|
+
{
|
|
280
|
+
"entity": "product",
|
|
281
|
+
"data": {
|
|
282
|
+
"id": "cc",
|
|
283
|
+
"name": "Cool Cap",
|
|
284
|
+
"size": "one size",
|
|
285
|
+
"price": 42
|
|
286
|
+
},
|
|
287
|
+
"context": {
|
|
288
|
+
"shopping": [
|
|
289
|
+
"complete",
|
|
290
|
+
0
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
"nested": []
|
|
303
294
|
},
|
|
304
|
-
|
|
295
|
+
{
|
|
296
|
+
"entity": "gift",
|
|
297
|
+
"data": {
|
|
298
|
+
"name": "Surprise"
|
|
299
|
+
},
|
|
300
|
+
"context": {
|
|
301
|
+
"shopping": [
|
|
302
|
+
"complete",
|
|
303
|
+
0
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
"nested": []
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"consent": {
|
|
310
|
+
"functional": true
|
|
311
|
+
},
|
|
312
|
+
"id": "1700000800-gr0up-1",
|
|
313
|
+
"trigger": "load",
|
|
314
|
+
"entity": "order",
|
|
315
|
+
"action": "complete",
|
|
316
|
+
"timestamp": 1700000800,
|
|
317
|
+
"timing": 3.14,
|
|
318
|
+
"group": "gr0up",
|
|
319
|
+
"count": 1,
|
|
320
|
+
"version": {
|
|
321
|
+
"source": "3.4.0-next-1776749829492",
|
|
322
|
+
"tagging": 1
|
|
323
|
+
},
|
|
324
|
+
"source": {
|
|
325
|
+
"type": "web",
|
|
326
|
+
"id": "https://shop.example.com",
|
|
327
|
+
"previous_id": ""
|
|
305
328
|
}
|
|
306
|
-
],
|
|
307
|
-
"consent": {
|
|
308
|
-
"functional": true
|
|
309
|
-
},
|
|
310
|
-
"id": "1700000800-gr0up-1",
|
|
311
|
-
"trigger": "load",
|
|
312
|
-
"entity": "order",
|
|
313
|
-
"action": "complete",
|
|
314
|
-
"timestamp": 1700000800,
|
|
315
|
-
"timing": 3.14,
|
|
316
|
-
"group": "gr0up",
|
|
317
|
-
"count": 1,
|
|
318
|
-
"version": {
|
|
319
|
-
"source": "3.2.0",
|
|
320
|
-
"tagging": 1
|
|
321
|
-
},
|
|
322
|
-
"source": {
|
|
323
|
-
"type": "web",
|
|
324
|
-
"id": "https://shop.example.com",
|
|
325
|
-
"previous_id": ""
|
|
326
329
|
}
|
|
327
|
-
|
|
328
|
-
|
|
330
|
+
]
|
|
331
|
+
]
|
|
329
332
|
},
|
|
330
333
|
"invalidFormat": {
|
|
331
334
|
"in": {
|
|
332
335
|
"name": "invalid",
|
|
333
336
|
"data": {}
|
|
334
337
|
},
|
|
335
|
-
"out":
|
|
338
|
+
"out": [
|
|
339
|
+
[
|
|
340
|
+
"return",
|
|
341
|
+
false
|
|
342
|
+
]
|
|
343
|
+
]
|
|
336
344
|
},
|
|
337
345
|
"validEvent": {
|
|
338
346
|
"in": {
|
|
@@ -372,7 +380,7 @@
|
|
|
372
380
|
"group": "gr0up",
|
|
373
381
|
"count": 1,
|
|
374
382
|
"version": {
|
|
375
|
-
"source": "3.
|
|
383
|
+
"source": "3.4.0-next-1776749829492",
|
|
376
384
|
"tagging": 1
|
|
377
385
|
},
|
|
378
386
|
"source": {
|
|
@@ -381,54 +389,57 @@
|
|
|
381
389
|
"previous_id": ""
|
|
382
390
|
}
|
|
383
391
|
},
|
|
384
|
-
"out":
|
|
385
|
-
|
|
386
|
-
"
|
|
387
|
-
|
|
388
|
-
"
|
|
389
|
-
"
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
"
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
"
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
"
|
|
423
|
-
"
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
"
|
|
428
|
-
|
|
392
|
+
"out": [
|
|
393
|
+
[
|
|
394
|
+
"return",
|
|
395
|
+
{
|
|
396
|
+
"name": "product view",
|
|
397
|
+
"data": {
|
|
398
|
+
"id": "SKU-100",
|
|
399
|
+
"name": "Trail Runner Pro",
|
|
400
|
+
"price": 129.99
|
|
401
|
+
},
|
|
402
|
+
"context": {
|
|
403
|
+
"shopping": [
|
|
404
|
+
"detail",
|
|
405
|
+
0
|
|
406
|
+
]
|
|
407
|
+
},
|
|
408
|
+
"globals": {
|
|
409
|
+
"pagegroup": "shop"
|
|
410
|
+
},
|
|
411
|
+
"custom": {
|
|
412
|
+
"completely": "random"
|
|
413
|
+
},
|
|
414
|
+
"user": {
|
|
415
|
+
"id": "us3r",
|
|
416
|
+
"device": "c00k13",
|
|
417
|
+
"session": "s3ss10n"
|
|
418
|
+
},
|
|
419
|
+
"nested": [],
|
|
420
|
+
"consent": {
|
|
421
|
+
"functional": true
|
|
422
|
+
},
|
|
423
|
+
"id": "1700000700-gr0up-1",
|
|
424
|
+
"trigger": "load",
|
|
425
|
+
"entity": "product",
|
|
426
|
+
"action": "view",
|
|
427
|
+
"timestamp": 1700000700,
|
|
428
|
+
"timing": 3.14,
|
|
429
|
+
"group": "gr0up",
|
|
430
|
+
"count": 1,
|
|
431
|
+
"version": {
|
|
432
|
+
"source": "3.4.0-next-1776749829492",
|
|
433
|
+
"tagging": 1
|
|
434
|
+
},
|
|
435
|
+
"source": {
|
|
436
|
+
"type": "web",
|
|
437
|
+
"id": "https://example.com",
|
|
438
|
+
"previous_id": ""
|
|
439
|
+
}
|
|
429
440
|
}
|
|
430
|
-
|
|
431
|
-
|
|
441
|
+
]
|
|
442
|
+
]
|
|
432
443
|
}
|
|
433
444
|
}
|
|
434
445
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walkeros/transformer-validator",
|
|
3
3
|
"description": "Event validation transformer for walkerOS using AJV and JSON Schema",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.4.0-next-1776749829492",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"ajv": "^8.17.1",
|
|
36
|
-
"@walkeros/core": "3.
|
|
36
|
+
"@walkeros/core": "3.4.0-next-1776749829492"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@walkeros/core": "3.
|
|
39
|
+
"@walkeros/core": "3.4.0-next-1776749829492"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"url": "git+https://github.com/elbwalker/walkerOS.git",
|