@walkeros/server-destination-aws 3.2.0 → 3.3.0-next-1776098542393
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 +164 -160
- package/dist/examples/index.mjs +164 -160
- 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/schemas.js +1 -1
- package/dist/schemas.js.map +1 -1
- package/dist/schemas.mjs +1 -1
- package/dist/schemas.mjs.map +1 -1
- package/dist/walkerOS.json +7 -7
- package/package.json +3 -2
package/dist/examples/index.js
CHANGED
|
@@ -605,7 +605,7 @@ function $constructor(name, initializer3, params) {
|
|
|
605
605
|
Object.defineProperty(inst, "_zod", {
|
|
606
606
|
value: {
|
|
607
607
|
def,
|
|
608
|
-
constr:
|
|
608
|
+
constr: _,
|
|
609
609
|
traits: /* @__PURE__ */ new Set()
|
|
610
610
|
},
|
|
611
611
|
enumerable: false
|
|
@@ -616,7 +616,7 @@ function $constructor(name, initializer3, params) {
|
|
|
616
616
|
}
|
|
617
617
|
inst._zod.traits.add(name);
|
|
618
618
|
initializer3(inst, def);
|
|
619
|
-
const proto =
|
|
619
|
+
const proto = _.prototype;
|
|
620
620
|
const keys = Object.keys(proto);
|
|
621
621
|
for (let i = 0; i < keys.length; i++) {
|
|
622
622
|
const k = keys[i];
|
|
@@ -629,7 +629,7 @@ function $constructor(name, initializer3, params) {
|
|
|
629
629
|
class Definition extends Parent {
|
|
630
630
|
}
|
|
631
631
|
Object.defineProperty(Definition, "name", { value: name });
|
|
632
|
-
function
|
|
632
|
+
function _(def) {
|
|
633
633
|
var _a5;
|
|
634
634
|
var _a4;
|
|
635
635
|
const inst = (params == null ? void 0 : params.Parent) ? new Definition() : this;
|
|
@@ -640,8 +640,8 @@ function $constructor(name, initializer3, params) {
|
|
|
640
640
|
}
|
|
641
641
|
return inst;
|
|
642
642
|
}
|
|
643
|
-
Object.defineProperty(
|
|
644
|
-
Object.defineProperty(
|
|
643
|
+
Object.defineProperty(_, "init", { value: init });
|
|
644
|
+
Object.defineProperty(_, Symbol.hasInstance, {
|
|
645
645
|
value: (inst) => {
|
|
646
646
|
var _a4, _b;
|
|
647
647
|
if ((params == null ? void 0 : params.Parent) && inst instanceof params.Parent)
|
|
@@ -649,8 +649,8 @@ function $constructor(name, initializer3, params) {
|
|
|
649
649
|
return (_b = (_a4 = inst == null ? void 0 : inst._zod) == null ? void 0 : _a4.traits) == null ? void 0 : _b.has(name);
|
|
650
650
|
}
|
|
651
651
|
});
|
|
652
|
-
Object.defineProperty(
|
|
653
|
-
return
|
|
652
|
+
Object.defineProperty(_, "name", { value: name });
|
|
653
|
+
return _;
|
|
654
654
|
}
|
|
655
655
|
var $brand = /* @__PURE__ */ Symbol("zod_brand");
|
|
656
656
|
var $ZodAsyncError = class extends Error {
|
|
@@ -748,17 +748,17 @@ function assertIs(_arg) {
|
|
|
748
748
|
function assertNever(_x) {
|
|
749
749
|
throw new Error("Unexpected value in exhaustive check");
|
|
750
750
|
}
|
|
751
|
-
function assert(
|
|
751
|
+
function assert(_) {
|
|
752
752
|
}
|
|
753
753
|
function getEnumValues(entries) {
|
|
754
754
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
755
|
-
const values = Object.entries(entries).filter(([k,
|
|
755
|
+
const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
756
756
|
return values;
|
|
757
757
|
}
|
|
758
758
|
function joinValues(array2, separator = "|") {
|
|
759
759
|
return array2.map((val) => stringifyPrimitive(val)).join(separator);
|
|
760
760
|
}
|
|
761
|
-
function jsonStringifyReplacer(
|
|
761
|
+
function jsonStringifyReplacer(_, value) {
|
|
762
762
|
if (typeof value === "bigint")
|
|
763
763
|
return value.toString();
|
|
764
764
|
return value;
|
|
@@ -888,7 +888,7 @@ var allowsEval = cached(() => {
|
|
|
888
888
|
const F = Function;
|
|
889
889
|
new F("");
|
|
890
890
|
return true;
|
|
891
|
-
} catch (
|
|
891
|
+
} catch (_) {
|
|
892
892
|
return false;
|
|
893
893
|
}
|
|
894
894
|
});
|
|
@@ -998,31 +998,31 @@ function normalizeParams(_params) {
|
|
|
998
998
|
function createTransparentProxy(getter) {
|
|
999
999
|
let target;
|
|
1000
1000
|
return new Proxy({}, {
|
|
1001
|
-
get(
|
|
1001
|
+
get(_, prop, receiver) {
|
|
1002
1002
|
target != null ? target : target = getter();
|
|
1003
1003
|
return Reflect.get(target, prop, receiver);
|
|
1004
1004
|
},
|
|
1005
|
-
set(
|
|
1005
|
+
set(_, prop, value, receiver) {
|
|
1006
1006
|
target != null ? target : target = getter();
|
|
1007
1007
|
return Reflect.set(target, prop, value, receiver);
|
|
1008
1008
|
},
|
|
1009
|
-
has(
|
|
1009
|
+
has(_, prop) {
|
|
1010
1010
|
target != null ? target : target = getter();
|
|
1011
1011
|
return Reflect.has(target, prop);
|
|
1012
1012
|
},
|
|
1013
|
-
deleteProperty(
|
|
1013
|
+
deleteProperty(_, prop) {
|
|
1014
1014
|
target != null ? target : target = getter();
|
|
1015
1015
|
return Reflect.deleteProperty(target, prop);
|
|
1016
1016
|
},
|
|
1017
|
-
ownKeys(
|
|
1017
|
+
ownKeys(_) {
|
|
1018
1018
|
target != null ? target : target = getter();
|
|
1019
1019
|
return Reflect.ownKeys(target);
|
|
1020
1020
|
},
|
|
1021
|
-
getOwnPropertyDescriptor(
|
|
1021
|
+
getOwnPropertyDescriptor(_, prop) {
|
|
1022
1022
|
target != null ? target : target = getter();
|
|
1023
1023
|
return Reflect.getOwnPropertyDescriptor(target, prop);
|
|
1024
1024
|
},
|
|
1025
|
-
defineProperty(
|
|
1025
|
+
defineProperty(_, prop, descriptor) {
|
|
1026
1026
|
target != null ? target : target = getter();
|
|
1027
1027
|
return Reflect.defineProperty(target, prop, descriptor);
|
|
1028
1028
|
}
|
|
@@ -1308,7 +1308,7 @@ function issue(...args) {
|
|
|
1308
1308
|
return { ...iss };
|
|
1309
1309
|
}
|
|
1310
1310
|
function cleanEnum(obj) {
|
|
1311
|
-
return Object.entries(obj).filter(([k,
|
|
1311
|
+
return Object.entries(obj).filter(([k, _]) => {
|
|
1312
1312
|
return Number.isNaN(Number.parseInt(k, 10));
|
|
1313
1313
|
}).map((el) => el[1]);
|
|
1314
1314
|
}
|
|
@@ -2394,13 +2394,13 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2394
2394
|
continue;
|
|
2395
2395
|
}
|
|
2396
2396
|
const currLen = payload.issues.length;
|
|
2397
|
-
const
|
|
2398
|
-
if (
|
|
2397
|
+
const _ = ch._zod.check(payload);
|
|
2398
|
+
if (_ instanceof Promise && (ctx == null ? void 0 : ctx.async) === false) {
|
|
2399
2399
|
throw new $ZodAsyncError();
|
|
2400
2400
|
}
|
|
2401
|
-
if (asyncResult ||
|
|
2401
|
+
if (asyncResult || _ instanceof Promise) {
|
|
2402
2402
|
asyncResult = (asyncResult != null ? asyncResult : Promise.resolve()).then(async () => {
|
|
2403
|
-
await
|
|
2403
|
+
await _;
|
|
2404
2404
|
const nextLen = payload.issues.length;
|
|
2405
2405
|
if (nextLen === currLen)
|
|
2406
2406
|
return;
|
|
@@ -2463,7 +2463,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2463
2463
|
try {
|
|
2464
2464
|
const r = safeParse(inst, value);
|
|
2465
2465
|
return r.success ? { value: r.data } : { issues: (_a5 = r.error) == null ? void 0 : _a5.issues };
|
|
2466
|
-
} catch (
|
|
2466
|
+
} catch (_) {
|
|
2467
2467
|
return safeParseAsync(inst, value).then((r) => {
|
|
2468
2468
|
var _a6;
|
|
2469
2469
|
return r.success ? { value: r.data } : { issues: (_a6 = r.error) == null ? void 0 : _a6.issues };
|
|
@@ -2478,11 +2478,11 @@ var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
|
|
|
2478
2478
|
var _a3, _b, _c;
|
|
2479
2479
|
$ZodType.init(inst, def);
|
|
2480
2480
|
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);
|
|
2481
|
-
inst._zod.parse = (payload,
|
|
2481
|
+
inst._zod.parse = (payload, _) => {
|
|
2482
2482
|
if (def.coerce)
|
|
2483
2483
|
try {
|
|
2484
2484
|
payload.value = String(payload.value);
|
|
2485
|
-
} catch (
|
|
2485
|
+
} catch (_2) {
|
|
2486
2486
|
}
|
|
2487
2487
|
if (typeof payload.value === "string")
|
|
2488
2488
|
return payload;
|
|
@@ -2570,7 +2570,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
2570
2570
|
payload.value = trimmed;
|
|
2571
2571
|
}
|
|
2572
2572
|
return;
|
|
2573
|
-
} catch (
|
|
2573
|
+
} catch (_) {
|
|
2574
2574
|
payload.issues.push({
|
|
2575
2575
|
code: "invalid_format",
|
|
2576
2576
|
format: "url",
|
|
@@ -2815,7 +2815,7 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
|
2815
2815
|
if (def.coerce)
|
|
2816
2816
|
try {
|
|
2817
2817
|
payload.value = Number(payload.value);
|
|
2818
|
-
} catch (
|
|
2818
|
+
} catch (_) {
|
|
2819
2819
|
}
|
|
2820
2820
|
const input = payload.value;
|
|
2821
2821
|
if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
|
|
@@ -2843,7 +2843,7 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
|
|
|
2843
2843
|
if (def.coerce)
|
|
2844
2844
|
try {
|
|
2845
2845
|
payload.value = Boolean(payload.value);
|
|
2846
|
-
} catch (
|
|
2846
|
+
} catch (_) {
|
|
2847
2847
|
}
|
|
2848
2848
|
const input = payload.value;
|
|
2849
2849
|
if (typeof input === "boolean")
|
|
@@ -2864,7 +2864,7 @@ var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
|
|
|
2864
2864
|
if (def.coerce)
|
|
2865
2865
|
try {
|
|
2866
2866
|
payload.value = BigInt(payload.value);
|
|
2867
|
-
} catch (
|
|
2867
|
+
} catch (_) {
|
|
2868
2868
|
}
|
|
2869
2869
|
if (typeof payload.value === "bigint")
|
|
2870
2870
|
return payload;
|
|
@@ -4351,7 +4351,7 @@ var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
|
4351
4351
|
var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
4352
4352
|
$ZodCheck.init(inst, def);
|
|
4353
4353
|
$ZodType.init(inst, def);
|
|
4354
|
-
inst._zod.parse = (payload,
|
|
4354
|
+
inst._zod.parse = (payload, _) => {
|
|
4355
4355
|
return payload;
|
|
4356
4356
|
};
|
|
4357
4357
|
inst._zod.check = (payload) => {
|
|
@@ -12033,7 +12033,7 @@ function toJSONSchema(input, params) {
|
|
|
12033
12033
|
const ctx2 = initializeContext({ ...params, processors: allProcessors });
|
|
12034
12034
|
const defs = {};
|
|
12035
12035
|
for (const entry of registry2._idmap.entries()) {
|
|
12036
|
-
const [
|
|
12036
|
+
const [_, schema] = entry;
|
|
12037
12037
|
process2(schema, ctx2);
|
|
12038
12038
|
}
|
|
12039
12039
|
const schemas = {};
|
|
@@ -12133,7 +12133,7 @@ var JSONSchemaGenerator = class {
|
|
|
12133
12133
|
}
|
|
12134
12134
|
extractDefs(this.ctx, schema);
|
|
12135
12135
|
const result = finalize(this.ctx, schema);
|
|
12136
|
-
const { "~standard":
|
|
12136
|
+
const { "~standard": _, ...plainResult } = result;
|
|
12137
12137
|
return plainResult;
|
|
12138
12138
|
}
|
|
12139
12139
|
};
|
|
@@ -14064,155 +14064,159 @@ var n = (n2, t) => {
|
|
|
14064
14064
|
var l = {};
|
|
14065
14065
|
n(l, { Level: () => d });
|
|
14066
14066
|
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 || {});
|
|
14067
|
-
var
|
|
14067
|
+
var W = { merge: true, shallow: true, extend: true };
|
|
14068
14068
|
function B(e2, n2 = {}, t = {}) {
|
|
14069
|
-
t = { ...
|
|
14069
|
+
t = { ...W, ...t };
|
|
14070
14070
|
const i = Object.entries(n2).reduce((n3, [i2, o]) => {
|
|
14071
14071
|
const r = e2[i2];
|
|
14072
14072
|
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;
|
|
14073
14073
|
}, {});
|
|
14074
14074
|
return t.shallow ? { ...e2, ...i } : (Object.assign(e2, i), e2);
|
|
14075
14075
|
}
|
|
14076
|
-
function
|
|
14076
|
+
function pe(e2 = {}) {
|
|
14077
14077
|
var _a3;
|
|
14078
|
-
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.
|
|
14078
|
+
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.2.0", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
|
|
14079
14079
|
if (e2.name) {
|
|
14080
14080
|
const [n3, t2] = (_a3 = e2.name.split(" ")) != null ? _a3 : [];
|
|
14081
14081
|
n3 && t2 && (o.entity = n3, o.action = t2);
|
|
14082
14082
|
}
|
|
14083
14083
|
return o;
|
|
14084
14084
|
}
|
|
14085
|
-
function
|
|
14085
|
+
function ue(e2 = "entity action", n2 = {}) {
|
|
14086
14086
|
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 } };
|
|
14087
|
-
return
|
|
14087
|
+
return pe({ ...{ "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 });
|
|
14088
14088
|
}
|
|
14089
|
-
function
|
|
14089
|
+
function ge(e2, n2, t = "draft-7") {
|
|
14090
14090
|
return external_exports.toJSONSchema(e2, { target: t });
|
|
14091
14091
|
}
|
|
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
|
-
var
|
|
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
|
-
|
|
14129
|
-
|
|
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
|
-
var
|
|
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
|
-
|
|
14164
|
-
|
|
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
|
|
14179
|
-
var
|
|
14180
|
-
var
|
|
14181
|
-
var
|
|
14182
|
-
var
|
|
14183
|
-
var
|
|
14184
|
-
var
|
|
14185
|
-
var
|
|
14186
|
-
var
|
|
14187
|
-
var
|
|
14188
|
-
var
|
|
14189
|
-
var
|
|
14190
|
-
var
|
|
14191
|
-
var
|
|
14192
|
-
var
|
|
14193
|
-
var
|
|
14194
|
-
var
|
|
14195
|
-
var
|
|
14196
|
-
var
|
|
14197
|
-
var
|
|
14198
|
-
var
|
|
14199
|
-
var
|
|
14200
|
-
var
|
|
14201
|
-
var
|
|
14202
|
-
var
|
|
14092
|
+
var me = external_exports.object({ param: external_exports.string().describe("Lowercase URL parameter name. Match is case-insensitive on lookup."), platform: external_exports.string().describe("Canonical platform identifier (lowercase, kebab-case).") });
|
|
14093
|
+
var fn;
|
|
14094
|
+
var bn = external_exports.string();
|
|
14095
|
+
var gn = external_exports.number();
|
|
14096
|
+
var mn = (external_exports.boolean(), external_exports.string().min(1));
|
|
14097
|
+
var hn = external_exports.number().int().positive();
|
|
14098
|
+
var vn = external_exports.number().int().nonnegative();
|
|
14099
|
+
var yn = external_exports.number().describe("Tagging version number");
|
|
14100
|
+
var wn = (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"));
|
|
14101
|
+
var kn = 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");
|
|
14102
|
+
var jn = external_exports.any().describe("Error handler function: (error, state?) => void");
|
|
14103
|
+
var Sn = external_exports.any().describe("Log handler function: (message, verbose?) => void");
|
|
14104
|
+
var xn = external_exports.object({ Error: jn.describe("Error handler function"), Log: Sn.describe("Log handler function") }).describe("Handler interface with error and log functions");
|
|
14105
|
+
var En = (ge(wn), ge(kn), ge(jn), ge(Sn), ge(xn), external_exports.object({ onError: jn.optional().describe("Error handler function: (error, state?) => void"), onLog: Sn.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(), On)])));
|
|
14106
|
+
var On = external_exports.lazy(() => external_exports.union([En, external_exports.array(En)]));
|
|
14107
|
+
var Cn = external_exports.record(external_exports.string(), On.optional()).describe("Flexible property collection with optional values");
|
|
14108
|
+
var $n = external_exports.record(external_exports.string(), external_exports.tuple([On, external_exports.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control");
|
|
14109
|
+
var Pn = external_exports.union([external_exports.enum(["web", "server", "app", "other"]), external_exports.string()]).describe("Source type: web, server, app, other, or custom");
|
|
14110
|
+
var Nn = external_exports.record(external_exports.string(), external_exports.boolean()).describe("Consent requirement mapping (group name \u2192 state)");
|
|
14111
|
+
var An = Cn.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");
|
|
14112
|
+
var Rn = Cn.and(external_exports.object({ source: bn.describe('Walker implementation version (e.g., "2.0.0")'), tagging: yn })).describe("Walker version information");
|
|
14113
|
+
var Dn = Cn.and(external_exports.object({ type: Pn.describe("Source type identifier"), id: bn.describe("Source identifier (typically URL on web)"), previous_id: bn.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information");
|
|
14114
|
+
var In = external_exports.lazy(() => external_exports.object({ entity: external_exports.string().describe("Entity name"), data: Cn.describe("Entity-specific properties"), nested: external_exports.array(In).describe("Nested child entities"), context: $n.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support");
|
|
14115
|
+
var zn = external_exports.array(In).describe("Array of nested entities");
|
|
14116
|
+
var Mn = external_exports.object({ name: external_exports.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: Cn.describe("Event-specific properties"), context: $n.describe("Ordered context properties with priorities"), globals: Cn.describe("Global properties shared across events"), custom: Cn.describe("Custom implementation-specific properties"), user: An.describe("User identification and attributes"), nested: zn.describe("Related nested entities"), consent: Nn.describe("Consent states at event time"), id: mn.describe("Unique event identifier (timestamp-based)"), trigger: bn.describe("Event trigger identifier"), entity: bn.describe("Parsed entity from event name"), action: bn.describe("Parsed action from event name"), timestamp: hn.describe("Unix timestamp in milliseconds since epoch"), timing: gn.describe("Event processing timing information"), group: bn.describe("Event grouping identifier"), count: vn.describe("Event count in session"), version: Rn.describe("Walker version information"), source: Dn.describe("Event source information") }).describe("Complete walkerOS event structure");
|
|
14117
|
+
var _n = Mn.partial().describe("Partial event structure with all fields optional");
|
|
14118
|
+
var Tn = (Mn.partial().describe("Partial event structure with all top-level fields optional"), ge(Mn), ge(_n), ge(An), ge(Cn), ge($n), ge(In), ge(Pn), ge(Nn), 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(() => fn), external_exports.array(Tn).describe("Array of values")])));
|
|
14119
|
+
var qn = external_exports.array(Tn).describe("Array of transformation values");
|
|
14120
|
+
var Ln = external_exports.lazy(() => external_exports.tuple([Tn, Tn]).describe("Loop transformation: [source, transform] tuple for array processing"));
|
|
14121
|
+
var Un = external_exports.lazy(() => external_exports.array(Tn).describe("Set: Array of values for selection or combination"));
|
|
14122
|
+
var Jn = external_exports.lazy(() => external_exports.record(external_exports.string(), Tn).describe("Map: Object mapping keys to transformation values"));
|
|
14123
|
+
var Wn = fn = 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: Jn.optional().describe("Object mapping: transform event data to structured output"), loop: Ln.optional().describe("Loop transformation: [source, transform] for array processing"), set: Un.optional().describe("Set of values: combine or select from multiple values"), consent: Nn.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");
|
|
14124
|
+
var Bn = external_exports.record(external_exports.string(), Tn).describe("Policy rules for event pre-processing (key \u2192 value mapping)");
|
|
14125
|
+
var Hn = 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: Nn.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([Tn, qn]).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: Bn.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination");
|
|
14126
|
+
var Fn = external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.union([Hn, external_exports.array(Hn)])).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*).');
|
|
14127
|
+
var Vn = external_exports.object({ consent: Nn.optional().describe("Required consent states to process any events"), data: external_exports.union([Tn, qn]).optional().describe("Global data transformation applied to all events"), mapping: Fn.optional().describe("Entity-action specific mapping rules"), policy: Bn.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations");
|
|
14128
|
+
var Gn = (external_exports.object({ eventMapping: Hn.optional().describe("Resolved mapping rule for event"), mappingKey: external_exports.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result"), ge(Tn), ge(Wn), ge(Ln), ge(Un), ge(Jn), ge(Bn), ge(Hn), ge(Fn), ge(Vn), {});
|
|
14129
|
+
n(Gn, { BatchSchema: () => it, ConfigSchema: () => Kn, ContextSchema: () => Xn, DLQSchema: () => ut, DataSchema: () => ot, DestinationPolicySchema: () => Qn, DestinationsSchema: () => ct, InitDestinationsSchema: () => at, InitSchema: () => st, InstanceSchema: () => rt, PartialConfigSchema: () => Zn, PushBatchContextSchema: () => et, PushContextSchema: () => Yn, PushEventSchema: () => nt, PushEventsSchema: () => tt, PushResultSchema: () => dt, RefSchema: () => lt, ResultSchema: () => pt, batchJsonSchema: () => ht, configJsonSchema: () => ft, contextJsonSchema: () => gt, instanceJsonSchema: () => vt, partialConfigJsonSchema: () => bt, pushContextJsonSchema: () => mt, resultJsonSchema: () => yt });
|
|
14130
|
+
var Kn = external_exports.object({ consent: Nn.optional().describe("Required consent states to send events to this destination"), settings: external_exports.any().describe("Implementation-specific configuration").optional(), data: external_exports.union([Tn, qn]).optional().describe("Global data transformation applied to all events for this destination"), env: external_exports.any().describe("Environment dependencies (platform-specific)").optional(), id: mn.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: Fn.optional().describe("Entity-action specific mapping rules for this destination"), policy: Bn.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: jn.optional(), onLog: Sn.optional() }).describe("Destination configuration");
|
|
14131
|
+
var Zn = Kn.partial().describe("Partial destination configuration with all fields optional");
|
|
14132
|
+
var Qn = Bn.describe("Destination policy rules for event pre-processing");
|
|
14133
|
+
var Xn = external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: Kn.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");
|
|
14134
|
+
var Yn = Xn.extend({ mapping: Hn.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping");
|
|
14135
|
+
var et = Yn.describe("Batch push context with event-specific mapping");
|
|
14136
|
+
var nt = external_exports.object({ event: Mn.describe("The event to process"), mapping: Hn.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing");
|
|
14137
|
+
var tt = external_exports.array(nt).describe("Array of events with mappings");
|
|
14138
|
+
var it = external_exports.object({ key: external_exports.string().describe('Batch key (usually mapping key like "product.view")'), events: external_exports.array(Mn).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: Hn.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key");
|
|
14139
|
+
var ot = external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data (Property, undefined, or array)");
|
|
14140
|
+
var rt = external_exports.object({ config: Kn.describe("Destination configuration"), queue: external_exports.array(Mn).optional().describe("Queued events awaiting consent"), dlq: external_exports.array(external_exports.tuple([Mn, 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)");
|
|
14141
|
+
var st = external_exports.object({ code: rt.describe("Destination instance with implementation"), config: Zn.optional().describe("Partial configuration overrides"), env: external_exports.unknown().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration");
|
|
14142
|
+
var at = external_exports.record(external_exports.string(), st).describe("Map of destination IDs to initialization configurations");
|
|
14143
|
+
var ct = external_exports.record(external_exports.string(), rt).describe("Map of destination IDs to runtime instances");
|
|
14144
|
+
var lt = 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");
|
|
14145
|
+
var dt = external_exports.object({ queue: external_exports.array(Mn).optional().describe("Events queued (awaiting consent)"), error: external_exports.unknown().optional().describe("Error if push failed") }).describe("Push operation result");
|
|
14146
|
+
var pt = 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(), lt).optional().describe("Destinations that processed successfully"), queued: external_exports.record(external_exports.string(), lt).optional().describe("Destinations that queued events"), failed: external_exports.record(external_exports.string(), lt).optional().describe("Destinations that failed to process") }).describe("Push result with destination outcomes");
|
|
14147
|
+
var ut = external_exports.array(external_exports.tuple([Mn, external_exports.unknown()])).describe("Dead letter queue: [(event, error), ...]");
|
|
14148
|
+
var ft = ge(Kn);
|
|
14149
|
+
var bt = ge(Zn);
|
|
14150
|
+
var gt = ge(Xn);
|
|
14151
|
+
var mt = ge(Yn);
|
|
14152
|
+
var ht = ge(it);
|
|
14153
|
+
var vt = ge(rt);
|
|
14154
|
+
var yt = ge(pt);
|
|
14155
|
+
var wt = 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");
|
|
14156
|
+
var kt = external_exports.object({ run: external_exports.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: yn, globalsStatic: Cn.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: jn.optional(), onLog: Sn.optional() }).describe("Core collector configuration");
|
|
14157
|
+
var jt = Cn.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: mn.describe("Session identifier").optional(), start: hn.describe("Session start timestamp").optional(), marketing: external_exports.literal(true).optional().describe("Marketing attribution flag"), updated: hn.describe("Last update timestamp").optional(), isNew: external_exports.boolean().describe("Whether this is a new session").optional(), device: mn.describe("Device identifier").optional(), count: vn.describe("Event count in session").optional(), runs: vn.describe("Number of runs").optional() })).describe("Session state and tracking data");
|
|
14158
|
+
var St = kt.partial().extend({ consent: Nn.optional().describe("Initial consent state"), user: An.optional().describe("Initial user data"), globals: Cn.optional().describe("Initial global properties"), sources: external_exports.unknown().optional().describe("Source configurations"), destinations: external_exports.unknown().optional().describe("Destination configurations"), custom: Cn.optional().describe("Initial custom implementation-specific properties") }).describe("Collector initialization configuration with initial state");
|
|
14159
|
+
var xt = external_exports.object({ mapping: Vn.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping");
|
|
14160
|
+
var Et = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source IDs to source instances");
|
|
14161
|
+
var Ot = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination IDs to destination instances");
|
|
14162
|
+
var Ct = 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: kt.describe("Current collector configuration"), consent: Nn.describe("Current consent state"), count: external_exports.number().describe("Event count (increments with each event)"), custom: Cn.describe("Custom implementation-specific properties"), sources: Et.describe("Registered source instances"), destinations: Ot.describe("Registered destination instances"), globals: Cn.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(Mn).describe("Queued events awaiting processing"), round: external_exports.number().describe("Collector run count (increments with each run)"), session: external_exports.union([jt]).describe("Current session state"), timing: external_exports.number().describe("Event processing timing information"), user: An.describe("Current user data"), version: external_exports.string().describe("Walker implementation version") }).describe("Collector instance with state and methods");
|
|
14163
|
+
var $t = (ge(wt), ge(kt), ge(jt), ge(St), ge(xt), ge(Ct), {});
|
|
14164
|
+
n($t, { BaseEnvSchema: () => Pt, ConfigSchema: () => Nt, InitSchema: () => Dt, InitSourceSchema: () => It, InitSourcesSchema: () => zt, InstanceSchema: () => Rt, PartialConfigSchema: () => At, baseEnvJsonSchema: () => Mt, configJsonSchema: () => _t, initSourceJsonSchema: () => Lt, initSourcesJsonSchema: () => Ut, instanceJsonSchema: () => qt, partialConfigJsonSchema: () => Tt });
|
|
14165
|
+
var Pt = 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");
|
|
14166
|
+
var Nt = Vn.extend({ settings: external_exports.any().describe("Implementation-specific configuration").optional(), env: Pt.optional().describe("Environment dependencies (platform-specific)"), id: mn.describe("Source identifier (defaults to source key)").optional(), onError: jn.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([Tn, qn]).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");
|
|
14167
|
+
var At = Nt.partial().describe("Partial source configuration with all fields optional");
|
|
14168
|
+
var Rt = external_exports.object({ type: external_exports.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: Nt.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");
|
|
14169
|
+
var Dt = external_exports.any().describe("Source initialization function: (config, env) => Instance | Promise<Instance>");
|
|
14170
|
+
var It = external_exports.object({ code: Dt.describe("Source initialization function"), config: At.optional().describe("Partial configuration overrides"), env: Pt.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");
|
|
14171
|
+
var zt = external_exports.record(external_exports.string(), It).describe("Map of source IDs to initialization configurations");
|
|
14172
|
+
var Mt = ge(Pt);
|
|
14173
|
+
var _t = ge(Nt);
|
|
14174
|
+
var Tt = ge(At);
|
|
14175
|
+
var qt = ge(Rt);
|
|
14176
|
+
var Lt = ge(It);
|
|
14177
|
+
var Ut = ge(zt);
|
|
14178
|
+
var Jt = external_exports.enum(["eq", "contains", "prefix", "suffix", "regex", "gt", "lt", "exists"]);
|
|
14179
|
+
var Wt = external_exports.object({ key: external_exports.string(), operator: Jt, value: external_exports.string(), not: external_exports.boolean().optional() });
|
|
14180
|
+
var Bt = external_exports.union([Wt, external_exports.object({ and: external_exports.array(external_exports.lazy(() => Bt)) }), external_exports.object({ or: external_exports.array(external_exports.lazy(() => Bt)) })]);
|
|
14181
|
+
var Ht = external_exports.union([Bt, external_exports.literal("*")]);
|
|
14182
|
+
var Ft = external_exports.union([external_exports.string(), external_exports.array(external_exports.string()), external_exports.array(external_exports.object({ match: Ht, next: external_exports.lazy(() => Ft) }))]);
|
|
14183
|
+
var Vt = (external_exports.object({ match: Ht, next: external_exports.lazy(() => Ft) }), external_exports.object({ match: external_exports.union([Bt, 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(), Tn).optional().describe("Response mutations applied on cache hit (key \u2192 Value mapping)") }));
|
|
14184
|
+
var Gt = 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(Vt).min(1).describe("Cache rules \u2014 at least one required") });
|
|
14185
|
+
var Kt = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).describe("Primitive value: string, number, or boolean");
|
|
14186
|
+
var Zt = external_exports.record(external_exports.string(), Kt).describe("Variables for interpolation");
|
|
14187
|
+
var Qt = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Reusable configuration definitions");
|
|
14188
|
+
var Xt = /^(@[a-z0-9\-~][a-z0-9\-._~]*\/)?[a-z0-9\-~][a-z0-9\-._~]*$/;
|
|
14189
|
+
var Yt = external_exports.record(external_exports.string().regex(Xt, "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");
|
|
14190
|
+
var ei = external_exports.record(external_exports.string().regex(Xt, "Invalid npm package name"), external_exports.string().min(1, "Override version cannot be empty")).describe("Transitive dependency version overrides");
|
|
14191
|
+
var ni = external_exports.object({ packages: Yt.optional().describe("NPM packages to bundle"), overrides: ei.optional().describe("Transitive dependency overrides") }).strict().describe("Bundle configuration (packages + overrides)");
|
|
14192
|
+
var ti = 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");
|
|
14193
|
+
var ii = external_exports.object({}).passthrough().describe("Server platform configuration (reserved for future options)");
|
|
14194
|
+
var oi = 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");
|
|
14195
|
+
var ri = 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"), command: external_exports.enum(["config", "consent", "user", "run"]).optional().describe("Invoke elb('walker <command>', in) instead of pushing in as an event") }).describe("Named example with input/output pair");
|
|
14196
|
+
var si = external_exports.record(external_exports.string(), ri).describe("Named step examples for testing and documentation");
|
|
14197
|
+
var ai = 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(), oi]).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: Zt.optional().describe("Source-level variables (highest priority in cascade)"), definitions: Qt.optional().describe("Source-level definitions (highest priority in cascade)"), next: Ft.optional().describe("Pre-collector transformer chain. String, string[], or NextRule[] for conditional routing based on ingest data."), before: Ft.optional().describe("Pre-source transformer chain (consent-exempt). Handles transport-level preprocessing."), examples: si.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Gt.optional().describe("Cache configuration for this source (match \u2192 key \u2192 ttl rules)") }).describe("Source package reference with configuration");
|
|
14198
|
+
var ci = 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(), oi]).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: Ft.optional().describe("Pre-transformer chain. Runs before this transformer push function."), next: Ft.optional().describe("Next transformer in chain. String, string[], or NextRule[] for conditional routing."), variables: Zt.optional().describe("Transformer-level variables (highest priority in cascade)"), definitions: Qt.optional().describe("Transformer-level definitions (highest priority in cascade)"), examples: si.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Gt.optional().describe("Cache configuration for this transformer (match \u2192 key \u2192 ttl rules)") }).describe("Transformer package reference with configuration");
|
|
14199
|
+
var li = 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(), oi]).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: Zt.optional().describe("Destination-level variables (highest priority in cascade)"), definitions: Qt.optional().describe("Destination-level definitions (highest priority in cascade)"), before: Ft.optional().describe("Post-collector transformer chain. String, string[], or NextRule[] for conditional routing."), next: Ft.optional().describe("Post-push transformer chain. Push response available at context.ingest._response."), examples: si.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Gt.optional().describe("Cache configuration for this destination (match \u2192 key \u2192 ttl rules)") }).describe("Destination package reference with configuration");
|
|
14200
|
+
var di = 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(), oi]).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: Zt.optional().describe("Store-level variables (highest priority in cascade)"), definitions: Qt.optional().describe("Store-level definitions (highest priority in cascade)"), examples: si.optional().describe("Named step examples for testing and documentation (stripped during bundling)") }).describe("Store package reference with configuration");
|
|
14201
|
+
var pi = external_exports.record(external_exports.string(), external_exports.unknown()).describe("JSON Schema object for event validation with description/examples annotations");
|
|
14202
|
+
var ui = external_exports.record(external_exports.string(), pi).describe("Action-level contract entries");
|
|
14203
|
+
var fi = external_exports.record(external_exports.string(), ui).describe("Entity-action event schemas");
|
|
14204
|
+
var bi = 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: pi.optional().describe("JSON Schema for event.globals"), context: pi.optional().describe("JSON Schema for event.context"), custom: pi.optional().describe("JSON Schema for event.custom"), user: pi.optional().describe("JSON Schema for event.user"), consent: pi.optional().describe("JSON Schema for event.consent"), events: fi.optional().describe("Entity-action event schemas") }).describe("Named contract entry with optional sections and events");
|
|
14205
|
+
var gi = external_exports.record(external_exports.string(), bi).describe("Named contracts with optional extends inheritance");
|
|
14206
|
+
var mi = external_exports.object({ web: ti.optional().describe("Web platform configuration (browser-based tracking). Mutually exclusive with server."), server: ii.optional().describe("Server platform configuration (Node.js). Mutually exclusive with web."), sources: external_exports.record(external_exports.string(), ai).optional().describe("Source configurations (data capture) keyed by unique identifier"), destinations: external_exports.record(external_exports.string(), li).optional().describe("Destination configurations (data output) keyed by unique identifier"), transformers: external_exports.record(external_exports.string(), ci).optional().describe("Transformer configurations (event transformation) keyed by unique identifier"), stores: external_exports.record(external_exports.string(), di).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)"), bundle: ni.optional().describe("Build-time configuration (packages + overrides)"), packages: external_exports.unknown().optional().refine((e2) => void 0 === e2, { message: "`packages` must live under `bundle.packages`. Move your packages block to `flow.<name>.bundle.packages`. This is a breaking change \u2014 see CHANGELOG migration guide." }).describe("Legacy top-level packages (moved to bundle.packages)"), variables: Zt.optional().describe("Flow-level variables (override Config.variables, overridden by source/destination variables)"), definitions: Qt.optional().describe("Flow-level definitions (extend Config.definitions, overridden by source/destination definitions)") }).refine((e2) => {
|
|
14203
14207
|
const n2 = void 0 !== e2.web, t = void 0 !== e2.server;
|
|
14204
14208
|
return (n2 || t) && !(n2 && t);
|
|
14205
14209
|
}, { message: 'Exactly one of "web" or "server" must be present' }).describe("Single flow settings for one deployment target");
|
|
14206
|
-
var
|
|
14207
|
-
external_exports.toJSONSchema(
|
|
14208
|
-
var
|
|
14209
|
-
var
|
|
14210
|
-
var
|
|
14211
|
-
var
|
|
14210
|
+
var hi = 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: Zt.optional().describe("Shared variables for interpolation across all flows (use $var.name syntax)"), definitions: Qt.optional().describe("Reusable configuration definitions (use $def.name syntax)"), flows: external_exports.record(external_exports.string(), mi).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: gi.optional().describe("Named contracts with extends inheritance and dot-path references") }).describe("walkerOS flow configuration (walkeros.config.json)");
|
|
14211
|
+
external_exports.toJSONSchema(hi, { target: "draft-7" }), ge(mi), ge(ai), ge(li), ge(ci), ge(di), ge(bi), ge(gi);
|
|
14212
|
+
var yi = external_exports.object({ lang: external_exports.string().optional().describe("Language identifier (e.g. json, sql, bash, typescript)"), code: external_exports.string().describe("Code snippet") });
|
|
14213
|
+
var wi = external_exports.object({ text: external_exports.string().describe("Short actionable hint text focused on walkerOS usage"), code: external_exports.array(yi).optional().describe("Optional code snippets") });
|
|
14214
|
+
var ki = (external_exports.record(external_exports.string(), wi).describe("Keyed hints for AI consumption \u2014 lightweight context beyond schemas and examples"), /* @__PURE__ */ new Set(["env", "onError", "onLog", "primary"]));
|
|
14215
|
+
var ji = { source: $t.configJsonSchema, destination: Gn.configJsonSchema };
|
|
14212
14216
|
|
|
14213
14217
|
// src/firehose/examples/step.ts
|
|
14214
14218
|
var firehoseRecord = {
|
|
14215
|
-
in:
|
|
14219
|
+
in: ue("page view", {
|
|
14216
14220
|
timestamp: 1700001e3,
|
|
14217
14221
|
data: { title: "Home", url: "https://example.com/" },
|
|
14218
14222
|
source: { type: "server", id: "", previous_id: "" }
|
|
@@ -14231,7 +14235,7 @@ var firehoseRecord = {
|
|
|
14231
14235
|
}
|
|
14232
14236
|
};
|
|
14233
14237
|
var orderEvent = {
|
|
14234
|
-
in:
|
|
14238
|
+
in: ue("order complete", {
|
|
14235
14239
|
timestamp: 1700001001,
|
|
14236
14240
|
data: { id: "ORD-400", total: 99.99, currency: "EUR" },
|
|
14237
14241
|
source: { type: "server", id: "", previous_id: "" }
|
|
@@ -14251,7 +14255,7 @@ var orderEvent = {
|
|
|
14251
14255
|
}
|
|
14252
14256
|
};
|
|
14253
14257
|
var userSignupEvent = {
|
|
14254
|
-
in:
|
|
14258
|
+
in: ue("user signup", {
|
|
14255
14259
|
timestamp: 1700001002,
|
|
14256
14260
|
data: { plan: "pro", source: "landing-page" },
|
|
14257
14261
|
user: { id: "usr-789", email: "new@example.com" },
|