@walkeros/web-destination-api 3.1.1 → 3.2.0
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/examples/index.js +168 -161
- package/dist/examples/index.mjs +168 -161
- package/dist/index.browser.js +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/walkerOS.json +4 -4
- package/package.json +3 -3
package/dist/examples/index.js
CHANGED
|
@@ -588,7 +588,7 @@ function $constructor(name, initializer3, params) {
|
|
|
588
588
|
Object.defineProperty(inst, "_zod", {
|
|
589
589
|
value: {
|
|
590
590
|
def,
|
|
591
|
-
constr:
|
|
591
|
+
constr: _2,
|
|
592
592
|
traits: /* @__PURE__ */ new Set()
|
|
593
593
|
},
|
|
594
594
|
enumerable: false
|
|
@@ -599,7 +599,7 @@ function $constructor(name, initializer3, params) {
|
|
|
599
599
|
}
|
|
600
600
|
inst._zod.traits.add(name);
|
|
601
601
|
initializer3(inst, def);
|
|
602
|
-
const proto =
|
|
602
|
+
const proto = _2.prototype;
|
|
603
603
|
const keys = Object.keys(proto);
|
|
604
604
|
for (let i = 0; i < keys.length; i++) {
|
|
605
605
|
const k = keys[i];
|
|
@@ -612,7 +612,7 @@ function $constructor(name, initializer3, params) {
|
|
|
612
612
|
class Definition extends Parent {
|
|
613
613
|
}
|
|
614
614
|
Object.defineProperty(Definition, "name", { value: name });
|
|
615
|
-
function
|
|
615
|
+
function _2(def) {
|
|
616
616
|
var _a5;
|
|
617
617
|
var _a4;
|
|
618
618
|
const inst = (params == null ? void 0 : params.Parent) ? new Definition() : this;
|
|
@@ -623,8 +623,8 @@ function $constructor(name, initializer3, params) {
|
|
|
623
623
|
}
|
|
624
624
|
return inst;
|
|
625
625
|
}
|
|
626
|
-
Object.defineProperty(
|
|
627
|
-
Object.defineProperty(
|
|
626
|
+
Object.defineProperty(_2, "init", { value: init2 });
|
|
627
|
+
Object.defineProperty(_2, Symbol.hasInstance, {
|
|
628
628
|
value: (inst) => {
|
|
629
629
|
var _a4, _b;
|
|
630
630
|
if ((params == null ? void 0 : params.Parent) && inst instanceof params.Parent)
|
|
@@ -632,8 +632,8 @@ function $constructor(name, initializer3, params) {
|
|
|
632
632
|
return (_b = (_a4 = inst == null ? void 0 : inst._zod) == null ? void 0 : _a4.traits) == null ? void 0 : _b.has(name);
|
|
633
633
|
}
|
|
634
634
|
});
|
|
635
|
-
Object.defineProperty(
|
|
636
|
-
return
|
|
635
|
+
Object.defineProperty(_2, "name", { value: name });
|
|
636
|
+
return _2;
|
|
637
637
|
}
|
|
638
638
|
var $brand = /* @__PURE__ */ Symbol("zod_brand");
|
|
639
639
|
var $ZodAsyncError = class extends Error {
|
|
@@ -731,17 +731,17 @@ function assertIs(_arg) {
|
|
|
731
731
|
function assertNever(_x) {
|
|
732
732
|
throw new Error("Unexpected value in exhaustive check");
|
|
733
733
|
}
|
|
734
|
-
function assert(
|
|
734
|
+
function assert(_2) {
|
|
735
735
|
}
|
|
736
736
|
function getEnumValues(entries) {
|
|
737
737
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
738
|
-
const values = Object.entries(entries).filter(([k,
|
|
738
|
+
const values = Object.entries(entries).filter(([k, _2]) => numericValues.indexOf(+k) === -1).map(([_2, v]) => v);
|
|
739
739
|
return values;
|
|
740
740
|
}
|
|
741
741
|
function joinValues(array2, separator = "|") {
|
|
742
742
|
return array2.map((val) => stringifyPrimitive(val)).join(separator);
|
|
743
743
|
}
|
|
744
|
-
function jsonStringifyReplacer(
|
|
744
|
+
function jsonStringifyReplacer(_2, value) {
|
|
745
745
|
if (typeof value === "bigint")
|
|
746
746
|
return value.toString();
|
|
747
747
|
return value;
|
|
@@ -871,7 +871,7 @@ var allowsEval = cached(() => {
|
|
|
871
871
|
const F = Function;
|
|
872
872
|
new F("");
|
|
873
873
|
return true;
|
|
874
|
-
} catch (
|
|
874
|
+
} catch (_2) {
|
|
875
875
|
return false;
|
|
876
876
|
}
|
|
877
877
|
});
|
|
@@ -981,31 +981,31 @@ function normalizeParams(_params) {
|
|
|
981
981
|
function createTransparentProxy(getter) {
|
|
982
982
|
let target;
|
|
983
983
|
return new Proxy({}, {
|
|
984
|
-
get(
|
|
984
|
+
get(_2, prop, receiver) {
|
|
985
985
|
target != null ? target : target = getter();
|
|
986
986
|
return Reflect.get(target, prop, receiver);
|
|
987
987
|
},
|
|
988
|
-
set(
|
|
988
|
+
set(_2, prop, value, receiver) {
|
|
989
989
|
target != null ? target : target = getter();
|
|
990
990
|
return Reflect.set(target, prop, value, receiver);
|
|
991
991
|
},
|
|
992
|
-
has(
|
|
992
|
+
has(_2, prop) {
|
|
993
993
|
target != null ? target : target = getter();
|
|
994
994
|
return Reflect.has(target, prop);
|
|
995
995
|
},
|
|
996
|
-
deleteProperty(
|
|
996
|
+
deleteProperty(_2, prop) {
|
|
997
997
|
target != null ? target : target = getter();
|
|
998
998
|
return Reflect.deleteProperty(target, prop);
|
|
999
999
|
},
|
|
1000
|
-
ownKeys(
|
|
1000
|
+
ownKeys(_2) {
|
|
1001
1001
|
target != null ? target : target = getter();
|
|
1002
1002
|
return Reflect.ownKeys(target);
|
|
1003
1003
|
},
|
|
1004
|
-
getOwnPropertyDescriptor(
|
|
1004
|
+
getOwnPropertyDescriptor(_2, prop) {
|
|
1005
1005
|
target != null ? target : target = getter();
|
|
1006
1006
|
return Reflect.getOwnPropertyDescriptor(target, prop);
|
|
1007
1007
|
},
|
|
1008
|
-
defineProperty(
|
|
1008
|
+
defineProperty(_2, prop, descriptor) {
|
|
1009
1009
|
target != null ? target : target = getter();
|
|
1010
1010
|
return Reflect.defineProperty(target, prop, descriptor);
|
|
1011
1011
|
}
|
|
@@ -1291,7 +1291,7 @@ function issue(...args) {
|
|
|
1291
1291
|
return { ...iss };
|
|
1292
1292
|
}
|
|
1293
1293
|
function cleanEnum(obj) {
|
|
1294
|
-
return Object.entries(obj).filter(([k,
|
|
1294
|
+
return Object.entries(obj).filter(([k, _2]) => {
|
|
1295
1295
|
return Number.isNaN(Number.parseInt(k, 10));
|
|
1296
1296
|
}).map((el) => el[1]);
|
|
1297
1297
|
}
|
|
@@ -2377,13 +2377,13 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2377
2377
|
continue;
|
|
2378
2378
|
}
|
|
2379
2379
|
const currLen = payload.issues.length;
|
|
2380
|
-
const
|
|
2381
|
-
if (
|
|
2380
|
+
const _2 = ch._zod.check(payload);
|
|
2381
|
+
if (_2 instanceof Promise && (ctx == null ? void 0 : ctx.async) === false) {
|
|
2382
2382
|
throw new $ZodAsyncError();
|
|
2383
2383
|
}
|
|
2384
|
-
if (asyncResult ||
|
|
2384
|
+
if (asyncResult || _2 instanceof Promise) {
|
|
2385
2385
|
asyncResult = (asyncResult != null ? asyncResult : Promise.resolve()).then(async () => {
|
|
2386
|
-
await
|
|
2386
|
+
await _2;
|
|
2387
2387
|
const nextLen = payload.issues.length;
|
|
2388
2388
|
if (nextLen === currLen)
|
|
2389
2389
|
return;
|
|
@@ -2446,7 +2446,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2446
2446
|
try {
|
|
2447
2447
|
const r = safeParse(inst, value);
|
|
2448
2448
|
return r.success ? { value: r.data } : { issues: (_a5 = r.error) == null ? void 0 : _a5.issues };
|
|
2449
|
-
} catch (
|
|
2449
|
+
} catch (_2) {
|
|
2450
2450
|
return safeParseAsync(inst, value).then((r) => {
|
|
2451
2451
|
var _a6;
|
|
2452
2452
|
return r.success ? { value: r.data } : { issues: (_a6 = r.error) == null ? void 0 : _a6.issues };
|
|
@@ -2461,11 +2461,11 @@ var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
|
|
|
2461
2461
|
var _a3, _b, _c;
|
|
2462
2462
|
$ZodType.init(inst, def);
|
|
2463
2463
|
inst._zod.pattern = (_c = [...(_b = (_a3 = inst == null ? void 0 : inst._zod.bag) == null ? void 0 : _a3.patterns) != null ? _b : []].pop()) != null ? _c : string(inst._zod.bag);
|
|
2464
|
-
inst._zod.parse = (payload,
|
|
2464
|
+
inst._zod.parse = (payload, _2) => {
|
|
2465
2465
|
if (def.coerce)
|
|
2466
2466
|
try {
|
|
2467
2467
|
payload.value = String(payload.value);
|
|
2468
|
-
} catch (
|
|
2468
|
+
} catch (_3) {
|
|
2469
2469
|
}
|
|
2470
2470
|
if (typeof payload.value === "string")
|
|
2471
2471
|
return payload;
|
|
@@ -2553,7 +2553,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
2553
2553
|
payload.value = trimmed;
|
|
2554
2554
|
}
|
|
2555
2555
|
return;
|
|
2556
|
-
} catch (
|
|
2556
|
+
} catch (_2) {
|
|
2557
2557
|
payload.issues.push({
|
|
2558
2558
|
code: "invalid_format",
|
|
2559
2559
|
format: "url",
|
|
@@ -2716,7 +2716,7 @@ var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
|
|
|
2716
2716
|
function isValidBase64URL(data) {
|
|
2717
2717
|
if (!base64url.test(data))
|
|
2718
2718
|
return false;
|
|
2719
|
-
const base643 = data.replace(/[-_]/g, (
|
|
2719
|
+
const base643 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
|
|
2720
2720
|
const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "=");
|
|
2721
2721
|
return isValidBase64(padded);
|
|
2722
2722
|
}
|
|
@@ -2798,7 +2798,7 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
|
2798
2798
|
if (def.coerce)
|
|
2799
2799
|
try {
|
|
2800
2800
|
payload.value = Number(payload.value);
|
|
2801
|
-
} catch (
|
|
2801
|
+
} catch (_2) {
|
|
2802
2802
|
}
|
|
2803
2803
|
const input = payload.value;
|
|
2804
2804
|
if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
|
|
@@ -2826,7 +2826,7 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
|
|
|
2826
2826
|
if (def.coerce)
|
|
2827
2827
|
try {
|
|
2828
2828
|
payload.value = Boolean(payload.value);
|
|
2829
|
-
} catch (
|
|
2829
|
+
} catch (_2) {
|
|
2830
2830
|
}
|
|
2831
2831
|
const input = payload.value;
|
|
2832
2832
|
if (typeof input === "boolean")
|
|
@@ -2847,7 +2847,7 @@ var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
|
|
|
2847
2847
|
if (def.coerce)
|
|
2848
2848
|
try {
|
|
2849
2849
|
payload.value = BigInt(payload.value);
|
|
2850
|
-
} catch (
|
|
2850
|
+
} catch (_2) {
|
|
2851
2851
|
}
|
|
2852
2852
|
if (typeof payload.value === "bigint")
|
|
2853
2853
|
return payload;
|
|
@@ -4334,7 +4334,7 @@ var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
|
4334
4334
|
var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
4335
4335
|
$ZodCheck.init(inst, def);
|
|
4336
4336
|
$ZodType.init(inst, def);
|
|
4337
|
-
inst._zod.parse = (payload,
|
|
4337
|
+
inst._zod.parse = (payload, _2) => {
|
|
4338
4338
|
return payload;
|
|
4339
4339
|
};
|
|
4340
4340
|
inst._zod.check = (payload) => {
|
|
@@ -12016,7 +12016,7 @@ function toJSONSchema(input, params) {
|
|
|
12016
12016
|
const ctx2 = initializeContext({ ...params, processors: allProcessors });
|
|
12017
12017
|
const defs = {};
|
|
12018
12018
|
for (const entry of registry2._idmap.entries()) {
|
|
12019
|
-
const [
|
|
12019
|
+
const [_2, schema] = entry;
|
|
12020
12020
|
process2(schema, ctx2);
|
|
12021
12021
|
}
|
|
12022
12022
|
const schemas = {};
|
|
@@ -12116,7 +12116,7 @@ var JSONSchemaGenerator = class {
|
|
|
12116
12116
|
}
|
|
12117
12117
|
extractDefs(this.ctx, schema);
|
|
12118
12118
|
const result = finalize(this.ctx, schema);
|
|
12119
|
-
const { "~standard":
|
|
12119
|
+
const { "~standard": _2, ...plainResult } = result;
|
|
12120
12120
|
return plainResult;
|
|
12121
12121
|
}
|
|
12122
12122
|
};
|
|
@@ -12904,9 +12904,9 @@ var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
|
|
|
12904
12904
|
inst._zod.processJSONSchema = (ctx, json2, params) => dateProcessor(inst, ctx, json2, params);
|
|
12905
12905
|
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
12906
12906
|
inst.max = (value, params) => inst.check(_lte(value, params));
|
|
12907
|
-
const
|
|
12908
|
-
inst.minDate =
|
|
12909
|
-
inst.maxDate =
|
|
12907
|
+
const c = inst._zod.bag;
|
|
12908
|
+
inst.minDate = c.minimum ? new Date(c.minimum) : null;
|
|
12909
|
+
inst.maxDate = c.maximum ? new Date(c.maximum) : null;
|
|
12910
12910
|
});
|
|
12911
12911
|
function date3(params) {
|
|
12912
12912
|
return _date(ZodDate, params);
|
|
@@ -14044,151 +14044,158 @@ var e = Object.defineProperty;
|
|
|
14044
14044
|
var n = (n2, t) => {
|
|
14045
14045
|
for (var i in t) e(n2, i, { get: t[i], enumerable: true });
|
|
14046
14046
|
};
|
|
14047
|
-
var
|
|
14048
|
-
n(
|
|
14049
|
-
var
|
|
14050
|
-
var
|
|
14051
|
-
function
|
|
14052
|
-
t = { ...
|
|
14047
|
+
var l = {};
|
|
14048
|
+
n(l, { Level: () => d });
|
|
14049
|
+
var d = ((e2) => (e2[e2.ERROR = 0] = "ERROR", e2[e2.WARN = 1] = "WARN", e2[e2.INFO = 2] = "INFO", e2[e2.DEBUG = 3] = "DEBUG", e2))(d || {});
|
|
14050
|
+
var _ = { merge: true, shallow: true, extend: true };
|
|
14051
|
+
function B(e2, n2 = {}, t = {}) {
|
|
14052
|
+
t = { ..._, ...t };
|
|
14053
14053
|
const i = Object.entries(n2).reduce((n3, [i2, o]) => {
|
|
14054
14054
|
const r = e2[i2];
|
|
14055
14055
|
return t.merge && Array.isArray(r) && Array.isArray(o) ? n3[i2] = o.reduce((e3, n4) => e3.includes(n4) ? e3 : [...e3, n4], [...r]) : (t.extend || i2 in e2) && (n3[i2] = o), n3;
|
|
14056
14056
|
}, {});
|
|
14057
14057
|
return t.shallow ? { ...e2, ...i } : (Object.assign(e2, i), e2);
|
|
14058
14058
|
}
|
|
14059
|
-
function
|
|
14059
|
+
function le(e2 = {}) {
|
|
14060
14060
|
var _a3;
|
|
14061
|
-
const n2 = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), t = e2.group || "gr0up", i = e2.count || 1, o =
|
|
14061
|
+
const n2 = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), t = e2.group || "gr0up", i = e2.count || 1, o = B({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${n2}-${t}-${i}`, trigger: "test", entity: "entity", action: "action", timestamp: n2, timing: 3.14, group: t, count: i, version: { source: "3.1.1", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
|
|
14062
14062
|
if (e2.name) {
|
|
14063
14063
|
const [n3, t2] = (_a3 = e2.name.split(" ")) != null ? _a3 : [];
|
|
14064
14064
|
n3 && t2 && (o.entity = n3, o.action = t2);
|
|
14065
14065
|
}
|
|
14066
14066
|
return o;
|
|
14067
14067
|
}
|
|
14068
|
-
function
|
|
14068
|
+
function de(e2 = "entity action", n2 = {}) {
|
|
14069
14069
|
const t = n2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), i = { data: { id: "ers", name: "Everyday Ruck Snack", color: "black", size: "l", price: 420 } }, o = { data: { id: "cc", name: "Cool Cap", size: "one size", price: 42 } };
|
|
14070
|
-
return
|
|
14070
|
+
return le({ ...{ "cart view": { data: { currency: "EUR", value: 2 * i.data.price }, context: { shopping: ["cart", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", data: { ...i.data, quantity: 2 }, context: { shopping: ["cart", 0] }, nested: [] }], trigger: "load" }, "checkout view": { data: { step: "payment", currency: "EUR", value: i.data.price + o.data.price }, context: { shopping: ["checkout", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...i, context: { shopping: ["checkout", 0] }, nested: [] }, { entity: "product", ...o, context: { shopping: ["checkout", 0] }, nested: [] }], trigger: "load" }, "order complete": { data: { id: "0rd3r1d", currency: "EUR", shipping: 5.22, taxes: 73.76, total: 555 }, context: { shopping: ["complete", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...i, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "product", ...o, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "gift", data: { name: "Surprise" }, context: { shopping: ["complete", 0] }, nested: [] }], trigger: "load" }, "page view": { data: { domain: "www.example.com", title: "walkerOS documentation", referrer: "https://www.walkeros.io/", search: "?foo=bar", hash: "#hash", id: "/docs/" }, globals: { pagegroup: "docs" }, trigger: "load" }, "product add": { ...i, context: { shopping: ["intent", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "click" }, "product view": { ...i, context: { shopping: ["detail", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "product visible": { data: { ...i.data, position: 3, promo: true }, context: { shopping: ["discover", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "promotion visible": { data: { name: "Setting up tracking easily", position: "hero" }, context: { ab_test: ["engagement", 0] }, globals: { pagegroup: "homepage" }, trigger: "visible" }, "session start": { data: { id: "s3ss10n", start: t, isNew: true, count: 1, runs: 1, isStart: true, storage: true, referrer: "", device: "c00k13" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n", hash: "h4sh", address: "street number", email: "user@example.com", phone: "+49 123 456 789", userAgent: "Mozilla...", browser: "Chrome", browserVersion: "90", deviceType: "desktop", language: "de-DE", country: "DE", region: "HH", city: "Hamburg", zip: "20354", timezone: "Berlin", os: "walkerOS", osVersion: "1.0", screenSize: "1337x420", ip: "127.0.0.0", internal: true, custom: "value" } } }[e2], ...n2, name: e2 });
|
|
14071
14071
|
}
|
|
14072
|
-
function
|
|
14072
|
+
function cn(e2, n2, t = "draft-7") {
|
|
14073
14073
|
return external_exports.toJSONSchema(e2, { target: t });
|
|
14074
14074
|
}
|
|
14075
|
-
var
|
|
14076
|
-
var
|
|
14077
|
-
var
|
|
14078
|
-
var
|
|
14079
|
-
var
|
|
14080
|
-
var
|
|
14081
|
-
var
|
|
14082
|
-
var
|
|
14083
|
-
var
|
|
14084
|
-
var
|
|
14085
|
-
var
|
|
14086
|
-
var
|
|
14087
|
-
var
|
|
14088
|
-
var
|
|
14089
|
-
var
|
|
14090
|
-
var
|
|
14091
|
-
var
|
|
14092
|
-
var
|
|
14093
|
-
var
|
|
14094
|
-
var
|
|
14095
|
-
var
|
|
14096
|
-
var
|
|
14097
|
-
var
|
|
14098
|
-
var
|
|
14099
|
-
var
|
|
14100
|
-
var
|
|
14101
|
-
var
|
|
14102
|
-
var
|
|
14103
|
-
var
|
|
14104
|
-
var
|
|
14105
|
-
var
|
|
14106
|
-
var
|
|
14107
|
-
var
|
|
14108
|
-
var
|
|
14109
|
-
var
|
|
14110
|
-
var
|
|
14111
|
-
n(
|
|
14112
|
-
var
|
|
14113
|
-
var
|
|
14114
|
-
var
|
|
14115
|
-
var
|
|
14116
|
-
var
|
|
14117
|
-
var
|
|
14118
|
-
var
|
|
14119
|
-
var
|
|
14120
|
-
var
|
|
14121
|
-
var
|
|
14122
|
-
var
|
|
14123
|
-
var
|
|
14124
|
-
var
|
|
14125
|
-
var
|
|
14126
|
-
var
|
|
14127
|
-
var
|
|
14128
|
-
var
|
|
14129
|
-
var
|
|
14130
|
-
var
|
|
14131
|
-
var
|
|
14132
|
-
var
|
|
14133
|
-
var
|
|
14134
|
-
var
|
|
14135
|
-
var
|
|
14136
|
-
var
|
|
14137
|
-
var
|
|
14138
|
-
var
|
|
14139
|
-
var
|
|
14140
|
-
var
|
|
14141
|
-
var
|
|
14142
|
-
var
|
|
14143
|
-
var
|
|
14144
|
-
var
|
|
14145
|
-
var
|
|
14146
|
-
n(
|
|
14147
|
-
var
|
|
14148
|
-
var
|
|
14149
|
-
var
|
|
14150
|
-
var
|
|
14151
|
-
var
|
|
14152
|
-
var
|
|
14153
|
-
var
|
|
14154
|
-
var
|
|
14155
|
-
var
|
|
14156
|
-
var
|
|
14157
|
-
var
|
|
14158
|
-
var
|
|
14159
|
-
var
|
|
14160
|
-
var
|
|
14161
|
-
var
|
|
14162
|
-
var
|
|
14163
|
-
var
|
|
14164
|
-
var
|
|
14165
|
-
var
|
|
14166
|
-
var
|
|
14167
|
-
var
|
|
14168
|
-
var
|
|
14169
|
-
var
|
|
14170
|
-
var
|
|
14171
|
-
var
|
|
14172
|
-
var
|
|
14173
|
-
var
|
|
14174
|
-
var
|
|
14175
|
-
var
|
|
14176
|
-
var
|
|
14177
|
-
var
|
|
14178
|
-
var
|
|
14075
|
+
var ln;
|
|
14076
|
+
var dn = external_exports.string();
|
|
14077
|
+
var un = external_exports.number();
|
|
14078
|
+
var pn = (external_exports.boolean(), external_exports.string().min(1));
|
|
14079
|
+
var fn = external_exports.number().int().positive();
|
|
14080
|
+
var bn = external_exports.number().int().nonnegative();
|
|
14081
|
+
var gn = external_exports.number().describe("Tagging version number");
|
|
14082
|
+
var mn = (external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).optional(), external_exports.enum(["local", "session", "cookie"]).describe("Storage mechanism: local, session, or cookie"));
|
|
14083
|
+
var hn = external_exports.object({ Local: external_exports.literal("local"), Session: external_exports.literal("session"), Cookie: external_exports.literal("cookie") }).describe("Storage type constants for type-safe references");
|
|
14084
|
+
var vn = external_exports.any().describe("Error handler function: (error, state?) => void");
|
|
14085
|
+
var yn = external_exports.any().describe("Log handler function: (message, verbose?) => void");
|
|
14086
|
+
var wn = external_exports.object({ Error: vn.describe("Error handler function"), Log: yn.describe("Log handler function") }).describe("Handler interface with error and log functions");
|
|
14087
|
+
var kn = (cn(mn), cn(hn), cn(vn), cn(yn), cn(wn), external_exports.object({ onError: vn.optional().describe("Error handler function: (error, state?) => void"), onLog: yn.optional().describe("Log handler function: (message, verbose?) => void") }).partial(), external_exports.object({ verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional() }).partial(), external_exports.object({ queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional() }).partial(), external_exports.object({}).partial(), external_exports.object({ init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional() }).partial(), external_exports.object({ primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial(), external_exports.object({ settings: external_exports.any().optional().describe("Implementation-specific configuration") }).partial(), external_exports.object({ env: external_exports.any().optional().describe("Environment dependencies (platform-specific)") }).partial(), external_exports.object({ type: external_exports.string().optional().describe("Instance type identifier"), config: external_exports.unknown().describe("Instance configuration") }).partial(), external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: external_exports.unknown().describe("Configuration"), env: external_exports.unknown().describe("Environment dependencies") }).partial(), external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), batched: external_exports.unknown().optional().describe("Batch of events to be processed") }).partial(), external_exports.object({ ignore: external_exports.boolean().describe("Set to true to skip processing").optional(), condition: external_exports.string().optional().describe("Condition function: return true to process") }).partial(), external_exports.object({ sources: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source instances") }).partial(), external_exports.object({ destinations: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination instances") }).partial(), external_exports.lazy(() => external_exports.union([external_exports.boolean(), external_exports.string(), external_exports.number(), external_exports.record(external_exports.string(), jn)])));
|
|
14088
|
+
var jn = external_exports.lazy(() => external_exports.union([kn, external_exports.array(kn)]));
|
|
14089
|
+
var Sn = external_exports.record(external_exports.string(), jn.optional()).describe("Flexible property collection with optional values");
|
|
14090
|
+
var xn = external_exports.record(external_exports.string(), external_exports.tuple([jn, external_exports.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control");
|
|
14091
|
+
var En = external_exports.union([external_exports.enum(["web", "server", "app", "other"]), external_exports.string()]).describe("Source type: web, server, app, other, or custom");
|
|
14092
|
+
var On = external_exports.record(external_exports.string(), external_exports.boolean()).describe("Consent requirement mapping (group name \u2192 state)");
|
|
14093
|
+
var Cn = Sn.and(external_exports.object({ id: external_exports.string().optional().describe("User identifier"), device: external_exports.string().optional().describe("Device identifier"), session: external_exports.string().optional().describe("Session identifier"), hash: external_exports.string().optional().describe("Hashed identifier"), address: external_exports.string().optional().describe("User address"), email: external_exports.string().email().optional().describe("User email address"), phone: external_exports.string().optional().describe("User phone number"), userAgent: external_exports.string().optional().describe("Browser user agent string"), browser: external_exports.string().optional().describe("Browser name"), browserVersion: external_exports.string().optional().describe("Browser version"), deviceType: external_exports.string().optional().describe("Device type (mobile, desktop, tablet)"), os: external_exports.string().optional().describe("Operating system"), osVersion: external_exports.string().optional().describe("Operating system version"), screenSize: external_exports.string().optional().describe("Screen dimensions"), language: external_exports.string().optional().describe("User language"), country: external_exports.string().optional().describe("User country"), region: external_exports.string().optional().describe("User region/state"), city: external_exports.string().optional().describe("User city"), zip: external_exports.string().optional().describe("User postal code"), timezone: external_exports.string().optional().describe("User timezone"), ip: external_exports.string().optional().describe("User IP address"), internal: external_exports.boolean().optional().describe("Internal user flag (employee, test user)") })).describe("User identification and properties");
|
|
14094
|
+
var Pn = Sn.and(external_exports.object({ source: dn.describe('Walker implementation version (e.g., "2.0.0")'), tagging: gn })).describe("Walker version information");
|
|
14095
|
+
var $n = Sn.and(external_exports.object({ type: En.describe("Source type identifier"), id: dn.describe("Source identifier (typically URL on web)"), previous_id: dn.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information");
|
|
14096
|
+
var Nn = external_exports.lazy(() => external_exports.object({ entity: external_exports.string().describe("Entity name"), data: Sn.describe("Entity-specific properties"), nested: external_exports.array(Nn).describe("Nested child entities"), context: xn.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support");
|
|
14097
|
+
var An = external_exports.array(Nn).describe("Array of nested entities");
|
|
14098
|
+
var Dn = external_exports.object({ name: external_exports.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: Sn.describe("Event-specific properties"), context: xn.describe("Ordered context properties with priorities"), globals: Sn.describe("Global properties shared across events"), custom: Sn.describe("Custom implementation-specific properties"), user: Cn.describe("User identification and attributes"), nested: An.describe("Related nested entities"), consent: On.describe("Consent states at event time"), id: pn.describe("Unique event identifier (timestamp-based)"), trigger: dn.describe("Event trigger identifier"), entity: dn.describe("Parsed entity from event name"), action: dn.describe("Parsed action from event name"), timestamp: fn.describe("Unix timestamp in milliseconds since epoch"), timing: un.describe("Event processing timing information"), group: dn.describe("Event grouping identifier"), count: bn.describe("Event count in session"), version: Pn.describe("Walker version information"), source: $n.describe("Event source information") }).describe("Complete walkerOS event structure");
|
|
14099
|
+
var Rn = Dn.partial().describe("Partial event structure with all fields optional");
|
|
14100
|
+
var In = (Dn.partial().describe("Partial event structure with all top-level fields optional"), cn(Dn), cn(Rn), cn(Cn), cn(Sn), cn(xn), cn(Nn), cn(En), cn(On), external_exports.lazy(() => external_exports.union([external_exports.string().describe('String value or property path (e.g., "data.id")'), external_exports.number().describe("Numeric value"), external_exports.boolean().describe("Boolean value"), external_exports.lazy(() => ln), external_exports.array(In).describe("Array of values")])));
|
|
14101
|
+
var zn = external_exports.array(In).describe("Array of transformation values");
|
|
14102
|
+
var Mn = external_exports.lazy(() => external_exports.tuple([In, In]).describe("Loop transformation: [source, transform] tuple for array processing"));
|
|
14103
|
+
var Tn = external_exports.lazy(() => external_exports.array(In).describe("Set: Array of values for selection or combination"));
|
|
14104
|
+
var qn = external_exports.lazy(() => external_exports.record(external_exports.string(), In).describe("Map: Object mapping keys to transformation values"));
|
|
14105
|
+
var Un = ln = external_exports.object({ key: external_exports.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).optional().describe("Static primitive value"), fn: external_exports.string().optional().describe("Custom transformation function as string (serialized)"), map: qn.optional().describe("Object mapping: transform event data to structured output"), loop: Mn.optional().describe("Loop transformation: [source, transform] for array processing"), set: Tn.optional().describe("Set of values: combine or select from multiple values"), consent: On.optional().describe("Required consent states to include this value"), condition: external_exports.string().optional().describe("Condition function as string: return true to include value"), validate: external_exports.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e2) => Object.keys(e2).length > 0, { message: "ValueConfig must have at least one property" }).describe("Value transformation configuration with multiple strategies");
|
|
14106
|
+
var Jn = external_exports.record(external_exports.string(), In).describe("Policy rules for event pre-processing (key \u2192 value mapping)");
|
|
14107
|
+
var Wn = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), condition: external_exports.string().optional().describe("Condition function as string: return true to process event"), consent: On.optional().describe("Required consent states to process this event"), settings: external_exports.any().optional().describe("Destination-specific settings for this event mapping"), data: external_exports.union([In, zn]).optional().describe("Data transformation rules for event"), ignore: external_exports.boolean().optional().describe("Set to true to skip processing this event"), name: external_exports.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), policy: Jn.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination");
|
|
14108
|
+
var Ln = external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.union([Wn, external_exports.array(Wn)])).optional()).describe('Event mapping rules: entity \u2192 action \u2192 Rule. Keys match event name split by space. Use "*" as wildcard for entity or action. Priority: exact > entity wildcard > action wildcard > global wildcard (*\u2192*).');
|
|
14109
|
+
var _n = external_exports.object({ consent: On.optional().describe("Required consent states to process any events"), data: external_exports.union([In, zn]).optional().describe("Global data transformation applied to all events"), mapping: Ln.optional().describe("Entity-action specific mapping rules"), policy: Jn.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations");
|
|
14110
|
+
var Bn = (external_exports.object({ eventMapping: Wn.optional().describe("Resolved mapping rule for event"), mappingKey: external_exports.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result"), cn(In), cn(Un), cn(Mn), cn(Tn), cn(qn), cn(Jn), cn(Wn), cn(Ln), cn(_n), {});
|
|
14111
|
+
n(Bn, { BatchSchema: () => Yn, ConfigSchema: () => Hn, ContextSchema: () => Kn, DLQSchema: () => ct, DataSchema: () => et, DestinationPolicySchema: () => Vn, DestinationsSchema: () => ot, InitDestinationsSchema: () => it, InitSchema: () => tt, InstanceSchema: () => nt, PartialConfigSchema: () => Fn, PushBatchContextSchema: () => Gn, PushContextSchema: () => Zn, PushEventSchema: () => Qn, PushEventsSchema: () => Xn, PushResultSchema: () => st, RefSchema: () => rt, ResultSchema: () => at, batchJsonSchema: () => ft, configJsonSchema: () => lt, contextJsonSchema: () => ut, instanceJsonSchema: () => bt, partialConfigJsonSchema: () => dt, pushContextJsonSchema: () => pt, resultJsonSchema: () => gt });
|
|
14112
|
+
var Hn = external_exports.object({ consent: On.optional().describe("Required consent states to send events to this destination"), settings: external_exports.any().describe("Implementation-specific configuration").optional(), data: external_exports.union([In, zn]).optional().describe("Global data transformation applied to all events for this destination"), env: external_exports.any().describe("Environment dependencies (platform-specific)").optional(), id: pn.describe("Destination instance identifier (defaults to destination key)").optional(), init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: Ln.optional().describe("Entity-action specific mapping rules for this destination"), policy: Jn.optional().describe("Pre-processing policy rules applied before event mapping"), queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional(), require: external_exports.array(external_exports.string()).optional().describe('Defer destination initialization until these collector events fire (e.g., ["consent"])'), logger: external_exports.object({ level: external_exports.union([external_exports.number(), external_exports.enum(["ERROR", "WARN", "INFO", "DEBUG"])]).optional().describe("Minimum log level (default: ERROR)"), handler: external_exports.any().optional().describe("Custom log handler function") }).optional().describe("Logger configuration (level, handler) to override the collector defaults"), onError: vn.optional(), onLog: yn.optional() }).describe("Destination configuration");
|
|
14113
|
+
var Fn = Hn.partial().describe("Partial destination configuration with all fields optional");
|
|
14114
|
+
var Vn = Jn.describe("Destination policy rules for event pre-processing");
|
|
14115
|
+
var Kn = external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: Hn.describe("Destination configuration"), data: external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data"), env: external_exports.unknown().describe("Environment dependencies") }).describe("Destination context for init and push functions");
|
|
14116
|
+
var Zn = Kn.extend({ mapping: Wn.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping");
|
|
14117
|
+
var Gn = Zn.describe("Batch push context with event-specific mapping");
|
|
14118
|
+
var Qn = external_exports.object({ event: Dn.describe("The event to process"), mapping: Wn.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing");
|
|
14119
|
+
var Xn = external_exports.array(Qn).describe("Array of events with mappings");
|
|
14120
|
+
var Yn = external_exports.object({ key: external_exports.string().describe('Batch key (usually mapping key like "product.view")'), events: external_exports.array(Dn).describe("Array of events in batch"), data: external_exports.array(external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional()).describe("Transformed data for each event"), mapping: Wn.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key");
|
|
14121
|
+
var et = external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data (Property, undefined, or array)");
|
|
14122
|
+
var nt = external_exports.object({ config: Hn.describe("Destination configuration"), queue: external_exports.array(Dn).optional().describe("Queued events awaiting consent"), dlq: external_exports.array(external_exports.tuple([Dn, external_exports.unknown()])).optional().describe("Dead letter queue (failed events with errors)"), type: external_exports.string().optional().describe("Destination type identifier"), env: external_exports.unknown().optional().describe("Environment dependencies"), init: external_exports.unknown().optional().describe("Initialization function"), push: external_exports.unknown().describe("Push function for single events"), pushBatch: external_exports.unknown().optional().describe("Batch push function"), on: external_exports.unknown().optional().describe("Event lifecycle hook function") }).describe("Destination instance (runtime object with functions)");
|
|
14123
|
+
var tt = external_exports.object({ code: nt.describe("Destination instance with implementation"), config: Fn.optional().describe("Partial configuration overrides"), env: external_exports.unknown().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration");
|
|
14124
|
+
var it = external_exports.record(external_exports.string(), tt).describe("Map of destination IDs to initialization configurations");
|
|
14125
|
+
var ot = external_exports.record(external_exports.string(), nt).describe("Map of destination IDs to runtime instances");
|
|
14126
|
+
var rt = external_exports.object({ type: external_exports.string().describe('Destination type ("gtag", "meta", "bigquery")'), data: external_exports.unknown().optional().describe("Response from push()"), error: external_exports.unknown().optional().describe("Error if failed") }).describe("Destination reference with type and response data");
|
|
14127
|
+
var st = external_exports.object({ queue: external_exports.array(Dn).optional().describe("Events queued (awaiting consent)"), error: external_exports.unknown().optional().describe("Error if push failed") }).describe("Push operation result");
|
|
14128
|
+
var at = external_exports.object({ ok: external_exports.boolean().describe("True if nothing failed"), event: external_exports.unknown().optional().describe("The processed event"), done: external_exports.record(external_exports.string(), rt).optional().describe("Destinations that processed successfully"), queued: external_exports.record(external_exports.string(), rt).optional().describe("Destinations that queued events"), failed: external_exports.record(external_exports.string(), rt).optional().describe("Destinations that failed to process") }).describe("Push result with destination outcomes");
|
|
14129
|
+
var ct = external_exports.array(external_exports.tuple([Dn, external_exports.unknown()])).describe("Dead letter queue: [(event, error), ...]");
|
|
14130
|
+
var lt = cn(Hn);
|
|
14131
|
+
var dt = cn(Fn);
|
|
14132
|
+
var ut = cn(Kn);
|
|
14133
|
+
var pt = cn(Zn);
|
|
14134
|
+
var ft = cn(Yn);
|
|
14135
|
+
var bt = cn(nt);
|
|
14136
|
+
var gt = cn(at);
|
|
14137
|
+
var mt = external_exports.union([external_exports.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), external_exports.string()]).describe("Collector command type: standard commands or custom string for extensions");
|
|
14138
|
+
var ht = external_exports.object({ run: external_exports.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: gn, globalsStatic: Sn.describe("Static global properties that persist across collector runs"), sessionStatic: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Static session data that persists across collector runs"), verbose: external_exports.boolean().describe("Enable verbose logging for debugging"), onError: vn.optional(), onLog: yn.optional() }).describe("Core collector configuration");
|
|
14139
|
+
var vt = Sn.and(external_exports.object({ isStart: external_exports.boolean().describe("Whether this is a new session start"), storage: external_exports.boolean().describe("Whether storage is available"), id: pn.describe("Session identifier").optional(), start: fn.describe("Session start timestamp").optional(), marketing: external_exports.literal(true).optional().describe("Marketing attribution flag"), updated: fn.describe("Last update timestamp").optional(), isNew: external_exports.boolean().describe("Whether this is a new session").optional(), device: pn.describe("Device identifier").optional(), count: bn.describe("Event count in session").optional(), runs: bn.describe("Number of runs").optional() })).describe("Session state and tracking data");
|
|
14140
|
+
var yt = ht.partial().extend({ consent: On.optional().describe("Initial consent state"), user: Cn.optional().describe("Initial user data"), globals: Sn.optional().describe("Initial global properties"), sources: external_exports.unknown().optional().describe("Source configurations"), destinations: external_exports.unknown().optional().describe("Destination configurations"), custom: Sn.optional().describe("Initial custom implementation-specific properties") }).describe("Collector initialization configuration with initial state");
|
|
14141
|
+
var wt = external_exports.object({ mapping: _n.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping");
|
|
14142
|
+
var kt = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source IDs to source instances");
|
|
14143
|
+
var jt = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination IDs to destination instances");
|
|
14144
|
+
var St = external_exports.object({ push: external_exports.unknown().describe("Push function for processing events"), command: external_exports.unknown().describe("Command function for walker commands"), allowed: external_exports.boolean().describe("Whether event processing is allowed"), config: ht.describe("Current collector configuration"), consent: On.describe("Current consent state"), count: external_exports.number().describe("Event count (increments with each event)"), custom: Sn.describe("Custom implementation-specific properties"), sources: kt.describe("Registered source instances"), destinations: jt.describe("Registered destination instances"), globals: Sn.describe("Current global properties"), group: external_exports.string().describe("Event grouping identifier"), hooks: external_exports.unknown().describe("Lifecycle hook functions"), on: external_exports.unknown().describe("Event lifecycle configuration"), queue: external_exports.array(Dn).describe("Queued events awaiting processing"), round: external_exports.number().describe("Collector run count (increments with each run)"), session: external_exports.union([vt]).describe("Current session state"), timing: external_exports.number().describe("Event processing timing information"), user: Cn.describe("Current user data"), version: external_exports.string().describe("Walker implementation version") }).describe("Collector instance with state and methods");
|
|
14145
|
+
var xt = (cn(mt), cn(ht), cn(vt), cn(yt), cn(wt), cn(St), {});
|
|
14146
|
+
n(xt, { BaseEnvSchema: () => Et, ConfigSchema: () => Ot, InitSchema: () => $t, InitSourceSchema: () => Nt, InitSourcesSchema: () => At, InstanceSchema: () => Pt, PartialConfigSchema: () => Ct, baseEnvJsonSchema: () => Dt, configJsonSchema: () => Rt, initSourceJsonSchema: () => Mt, initSourcesJsonSchema: () => Tt, instanceJsonSchema: () => zt, partialConfigJsonSchema: () => It });
|
|
14147
|
+
var Et = external_exports.object({ push: external_exports.unknown().describe("Collector push function"), command: external_exports.unknown().describe("Collector command function"), sources: external_exports.unknown().optional().describe("Map of registered source instances"), elb: external_exports.unknown().describe("Public API function (alias for collector.push)") }).catchall(external_exports.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this");
|
|
14148
|
+
var Ot = _n.extend({ settings: external_exports.any().describe("Implementation-specific configuration").optional(), env: Et.optional().describe("Environment dependencies (platform-specific)"), id: pn.describe("Source identifier (defaults to source key)").optional(), onError: vn.optional(), primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional(), require: external_exports.array(external_exports.string()).optional().describe('Defer source initialization until these collector events fire (e.g., ["consent"])'), logger: external_exports.object({ level: external_exports.union([external_exports.number(), external_exports.enum(["ERROR", "WARN", "INFO", "DEBUG"])]).optional().describe("Minimum log level (default: ERROR)"), handler: external_exports.any().optional().describe("Custom log handler function") }).optional().describe("Logger configuration (level, handler) to override the collector defaults"), ingest: external_exports.union([In, zn]).optional().describe("Ingest metadata extraction mapping. Extracts values from raw request objects (Express req, Lambda event) using mapping syntax.") }).describe("Source configuration with mapping and environment");
|
|
14149
|
+
var Ct = Ot.partial().describe("Partial source configuration with all fields optional");
|
|
14150
|
+
var Pt = external_exports.object({ type: external_exports.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: Ot.describe("Current source configuration"), push: external_exports.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: external_exports.any().optional().describe("Cleanup function called when source is removed"), on: external_exports.unknown().optional().describe("Lifecycle hook function for event types") }).describe("Source instance with push handler and lifecycle methods");
|
|
14151
|
+
var $t = external_exports.any().describe("Source initialization function: (config, env) => Instance | Promise<Instance>");
|
|
14152
|
+
var Nt = external_exports.object({ code: $t.describe("Source initialization function"), config: Ct.optional().describe("Partial configuration overrides"), env: Et.partial().optional().describe("Partial environment overrides"), primary: external_exports.boolean().optional().describe("Mark as primary source (only one can be primary)") }).describe("Source initialization configuration");
|
|
14153
|
+
var At = external_exports.record(external_exports.string(), Nt).describe("Map of source IDs to initialization configurations");
|
|
14154
|
+
var Dt = cn(Et);
|
|
14155
|
+
var Rt = cn(Ot);
|
|
14156
|
+
var It = cn(Ct);
|
|
14157
|
+
var zt = cn(Pt);
|
|
14158
|
+
var Mt = cn(Nt);
|
|
14159
|
+
var Tt = cn(At);
|
|
14160
|
+
var qt = external_exports.enum(["eq", "contains", "prefix", "suffix", "regex", "gt", "lt", "exists"]);
|
|
14161
|
+
var Ut = external_exports.object({ key: external_exports.string(), operator: qt, value: external_exports.string(), not: external_exports.boolean().optional() });
|
|
14162
|
+
var Jt = external_exports.union([Ut, external_exports.object({ and: external_exports.array(external_exports.lazy(() => Jt)) }), external_exports.object({ or: external_exports.array(external_exports.lazy(() => Jt)) })]);
|
|
14163
|
+
var Wt = external_exports.union([Jt, external_exports.literal("*")]);
|
|
14164
|
+
var Lt = external_exports.union([external_exports.string(), external_exports.array(external_exports.string()), external_exports.array(external_exports.object({ match: Wt, next: external_exports.lazy(() => Lt) }))]);
|
|
14165
|
+
var _t = (external_exports.object({ match: Wt, next: external_exports.lazy(() => Lt) }), external_exports.object({ match: external_exports.union([Jt, external_exports.literal("*")]).describe("Match expression or wildcard to determine when this rule applies"), key: external_exports.array(external_exports.string()).min(1).describe("Dot-path fields used to build the cache key"), ttl: external_exports.number().positive().describe("Time-to-live in seconds for cached entries"), update: external_exports.record(external_exports.string(), In).optional().describe("Response mutations applied on cache hit (key \u2192 Value mapping)") }));
|
|
14166
|
+
var Bt = external_exports.object({ full: external_exports.boolean().optional().describe("Stop flow on cache HIT (default: false). When true, skip remaining steps and return cached value."), store: external_exports.string().optional().describe("Store ID for persistent caching (references a configured store)"), rules: external_exports.array(_t).min(1).describe("Cache rules \u2014 at least one required") });
|
|
14167
|
+
var Ht = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).describe("Primitive value: string, number, or boolean");
|
|
14168
|
+
var Ft = external_exports.record(external_exports.string(), Ht).describe("Variables for interpolation");
|
|
14169
|
+
var Vt = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Reusable configuration definitions");
|
|
14170
|
+
var Kt = external_exports.record(external_exports.string().regex(/^(@[a-z0-9\-~][a-z0-9\-._~]*\/)?[a-z0-9\-~][a-z0-9\-._~]*$/, "Invalid npm package name"), external_exports.object({ version: external_exports.string().optional(), imports: external_exports.array(external_exports.string()).optional(), path: external_exports.string().optional() })).describe("NPM packages to bundle");
|
|
14171
|
+
var Zt = external_exports.object({ windowCollector: external_exports.string().default("collector").optional().describe('Window property name for the collector instance (default: "collector")'), windowElb: external_exports.string().default("elb").optional().describe('Window property name for the elb command queue (default: "elb")') }).describe("Web platform configuration");
|
|
14172
|
+
var Gt = external_exports.object({}).passthrough().describe("Server platform configuration (reserved for future options)");
|
|
14173
|
+
var Qt = external_exports.object({ push: external_exports.string().min(1, "Push function cannot be empty").describe('JavaScript function for processing events. Must start with "$code:" prefix. Example: "$code:(event) => { console.log(event); }"'), type: external_exports.string().optional().describe("Optional type identifier for the inline instance"), init: external_exports.string().optional().describe("Optional initialization function. Use $code: prefix for inline JavaScript.") }).describe("Inline code for custom sources/transformers/destinations");
|
|
14174
|
+
var Xt = external_exports.object({ description: external_exports.string().optional().describe("Human-readable description"), in: external_exports.unknown().optional().describe("Input to the step"), trigger: external_exports.object({ type: external_exports.string().optional().describe("Trigger mechanism (e.g., click, POST, load)"), options: external_exports.unknown().optional().describe("Mechanism-specific options") }).optional().describe("Source trigger metadata"), mapping: external_exports.unknown().optional().describe("Mapping configuration"), out: external_exports.unknown().optional().describe("Expected output from the step") }).describe("Named example with input/output pair");
|
|
14175
|
+
var Yt = external_exports.record(external_exports.string(), Xt).describe("Named step examples for testing and documentation");
|
|
14176
|
+
var ei = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")'), code: external_exports.union([external_exports.string(), Qt]).optional().describe('Either a named export string (e.g., "sourceExpress") or an inline code object with push function'), config: external_exports.unknown().optional().describe("Source-specific configuration object"), env: external_exports.unknown().optional().describe("Source environment configuration"), primary: external_exports.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary."), variables: Ft.optional().describe("Source-level variables (highest priority in cascade)"), definitions: Vt.optional().describe("Source-level definitions (highest priority in cascade)"), next: Lt.optional().describe("Pre-collector transformer chain. String, string[], or NextRule[] for conditional routing based on ingest data."), before: Lt.optional().describe("Pre-source transformer chain (consent-exempt). Handles transport-level preprocessing."), examples: Yt.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Bt.optional().describe("Cache configuration for this source (match \u2192 key \u2192 ttl rules)") }).describe("Source package reference with configuration");
|
|
14177
|
+
var ni = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/transformer-enricher@1.0.0")'), code: external_exports.union([external_exports.string(), Qt]).optional().describe('Either a named export string (e.g., "transformerEnricher") or an inline code object with push function'), config: external_exports.unknown().optional().describe("Transformer-specific configuration object"), env: external_exports.unknown().optional().describe("Transformer environment configuration"), before: Lt.optional().describe("Pre-transformer chain. Runs before this transformer push function."), next: Lt.optional().describe("Next transformer in chain. String, string[], or NextRule[] for conditional routing."), variables: Ft.optional().describe("Transformer-level variables (highest priority in cascade)"), definitions: Vt.optional().describe("Transformer-level definitions (highest priority in cascade)"), examples: Yt.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Bt.optional().describe("Cache configuration for this transformer (match \u2192 key \u2192 ttl rules)") }).describe("Transformer package reference with configuration");
|
|
14178
|
+
var ti = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")'), code: external_exports.union([external_exports.string(), Qt]).optional().describe('Either a named export string (e.g., "destinationAnalytics") or an inline code object with push function'), config: external_exports.unknown().optional().describe("Destination-specific configuration object"), env: external_exports.unknown().optional().describe("Destination environment configuration"), variables: Ft.optional().describe("Destination-level variables (highest priority in cascade)"), definitions: Vt.optional().describe("Destination-level definitions (highest priority in cascade)"), before: Lt.optional().describe("Post-collector transformer chain. String, string[], or NextRule[] for conditional routing."), next: Lt.optional().describe("Post-push transformer chain. Push response available at context.ingest._response."), examples: Yt.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Bt.optional().describe("Cache configuration for this destination (match \u2192 key \u2192 ttl rules)") }).describe("Destination package reference with configuration");
|
|
14179
|
+
var ii = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe("Store package specifier with optional version"), code: external_exports.union([external_exports.string(), Qt]).optional().describe("Named export string or inline code definition"), config: external_exports.unknown().optional().describe("Store-specific configuration object"), env: external_exports.unknown().optional().describe("Store environment configuration"), variables: Ft.optional().describe("Store-level variables (highest priority in cascade)"), definitions: Vt.optional().describe("Store-level definitions (highest priority in cascade)"), examples: Yt.optional().describe("Named step examples for testing and documentation (stripped during bundling)") }).describe("Store package reference with configuration");
|
|
14180
|
+
var oi = external_exports.record(external_exports.string(), external_exports.unknown()).describe("JSON Schema object for event validation with description/examples annotations");
|
|
14181
|
+
var ri = external_exports.record(external_exports.string(), oi).describe("Action-level contract entries");
|
|
14182
|
+
var si = external_exports.record(external_exports.string(), ri).describe("Entity-action event schemas");
|
|
14183
|
+
var ai = external_exports.object({ extends: external_exports.string().optional().describe("Inherit from another named contract"), tagging: external_exports.number().int().min(0).optional().describe("Contract version number"), description: external_exports.string().optional().describe("Human-readable description"), globals: oi.optional().describe("JSON Schema for event.globals"), context: oi.optional().describe("JSON Schema for event.context"), custom: oi.optional().describe("JSON Schema for event.custom"), user: oi.optional().describe("JSON Schema for event.user"), consent: oi.optional().describe("JSON Schema for event.consent"), events: si.optional().describe("Entity-action event schemas") }).describe("Named contract entry with optional sections and events");
|
|
14184
|
+
var ci = external_exports.record(external_exports.string(), ai).describe("Named contracts with optional extends inheritance");
|
|
14185
|
+
var li = external_exports.object({ web: Zt.optional().describe("Web platform configuration (browser-based tracking). Mutually exclusive with server."), server: Gt.optional().describe("Server platform configuration (Node.js). Mutually exclusive with web."), sources: external_exports.record(external_exports.string(), ei).optional().describe("Source configurations (data capture) keyed by unique identifier"), destinations: external_exports.record(external_exports.string(), ti).optional().describe("Destination configurations (data output) keyed by unique identifier"), transformers: external_exports.record(external_exports.string(), ni).optional().describe("Transformer configurations (event transformation) keyed by unique identifier"), stores: external_exports.record(external_exports.string(), ii).optional().describe("Store configurations (key-value storage) keyed by unique identifier"), collector: external_exports.unknown().optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"), packages: Kt.optional().describe("NPM packages to bundle"), variables: Ft.optional().describe("Flow-level variables (override Config.variables, overridden by source/destination variables)"), definitions: Vt.optional().describe("Flow-level definitions (extend Config.definitions, overridden by source/destination definitions)") }).refine((e2) => {
|
|
14179
14186
|
const n2 = void 0 !== e2.web, t = void 0 !== e2.server;
|
|
14180
14187
|
return (n2 || t) && !(n2 && t);
|
|
14181
14188
|
}, { message: 'Exactly one of "web" or "server" must be present' }).describe("Single flow settings for one deployment target");
|
|
14182
|
-
var
|
|
14183
|
-
external_exports.toJSONSchema(
|
|
14184
|
-
var
|
|
14185
|
-
var
|
|
14186
|
-
var
|
|
14187
|
-
var
|
|
14189
|
+
var di = external_exports.object({ $schema: external_exports.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v2.json")'), include: external_exports.array(external_exports.string()).optional().describe("Folders to include in the bundle output"), variables: Ft.optional().describe("Shared variables for interpolation across all flows (use $var.name syntax)"), definitions: Vt.optional().describe("Reusable configuration definitions (use $def.name syntax)"), flows: external_exports.record(external_exports.string(), li).refine((e2) => Object.keys(e2).length > 0, { message: "At least one flow is required" }).describe("Named flow configurations (e.g., production, staging, development)") }).extend({ version: external_exports.literal(3).describe("Configuration schema version"), contract: ci.optional().describe("Named contracts with extends inheritance and dot-path references") }).describe("walkerOS flow configuration (walkeros.config.json)");
|
|
14190
|
+
external_exports.toJSONSchema(di, { target: "draft-7" }), cn(li), cn(ei), cn(ti), cn(ni), cn(ii), cn(ai), cn(ci);
|
|
14191
|
+
var pi = external_exports.object({ lang: external_exports.string().optional().describe("Language identifier (e.g. json, sql, bash, typescript)"), code: external_exports.string().describe("Code snippet") });
|
|
14192
|
+
var fi = external_exports.object({ text: external_exports.string().describe("Short actionable hint text focused on walkerOS usage"), code: external_exports.array(pi).optional().describe("Optional code snippets") });
|
|
14193
|
+
var bi = (external_exports.record(external_exports.string(), fi).describe("Keyed hints for AI consumption \u2014 lightweight context beyond schemas and examples"), /* @__PURE__ */ new Set(["env", "onError", "onLog", "primary"]));
|
|
14194
|
+
var gi = { source: xt.configJsonSchema, destination: Bn.configJsonSchema };
|
|
14188
14195
|
|
|
14189
14196
|
// src/examples/step.ts
|
|
14190
14197
|
var entityAction = {
|
|
14191
|
-
in:
|
|
14198
|
+
in: de("entity action", { timestamp: 1700000500 }),
|
|
14192
14199
|
mapping: {
|
|
14193
14200
|
data: "data"
|
|
14194
14201
|
},
|
|
@@ -14200,7 +14207,7 @@ var entityAction = {
|
|
|
14200
14207
|
})
|
|
14201
14208
|
};
|
|
14202
14209
|
var pageView = {
|
|
14203
|
-
in:
|
|
14210
|
+
in: de("page view", { timestamp: 1700000501 }),
|
|
14204
14211
|
mapping: {
|
|
14205
14212
|
data: "data"
|
|
14206
14213
|
},
|
|
@@ -14214,7 +14221,7 @@ var pageView = {
|
|
|
14214
14221
|
})
|
|
14215
14222
|
};
|
|
14216
14223
|
var customTransform = {
|
|
14217
|
-
in:
|
|
14224
|
+
in: de("order complete", { timestamp: 1700000502 }),
|
|
14218
14225
|
mapping: {
|
|
14219
14226
|
data: {
|
|
14220
14227
|
map: {
|