@walkeros/web-source-cmp-usercentrics 3.3.1 → 3.4.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.d.mts CHANGED
@@ -1,4 +1,6 @@
1
1
  import { WalkerOS, Elb, Logger, Flow, Trigger } from '@walkeros/core';
2
+ import * as _walkeros_core_dev from '@walkeros/core/dev';
3
+ import { z } from '@walkeros/core/dev';
2
4
 
3
5
  /**
4
6
  * Usercentrics consent event detail structure.
@@ -124,23 +126,42 @@ declare const createTrigger: Trigger.CreateFn<UsercentricsContent, void>;
124
126
  /** Dispatches ucEvent CustomEvent after source init (post-init trigger). */
125
127
  declare const trigger: (input: unknown, env: Record<string, unknown>) => void | (() => void);
126
128
 
127
- declare const index_createMockElbFn: typeof createMockElbFn;
128
- declare const index_createTrigger: typeof createTrigger;
129
- declare const index_fullConsentCustomMapped: typeof fullConsentCustomMapped;
130
- declare const index_fullConsentMapped: typeof fullConsentMapped;
131
- declare const index_fullConsentUpperCase: typeof fullConsentUpperCase;
132
- declare const index_implicitConsent: typeof implicitConsent;
133
- declare const index_minimalConsentMapped: typeof minimalConsentMapped;
134
- declare const index_nonConsentEvent: typeof nonConsentEvent;
135
- declare const index_noopLogger: typeof noopLogger;
136
- declare const index_partialConsent: typeof partialConsent;
137
- declare const index_partialConsentMapped: typeof partialConsentMapped;
138
- declare const index_serviceLevelConsent: typeof serviceLevelConsent;
139
- declare const index_serviceLevelMapped: typeof serviceLevelMapped;
140
- declare const index_step: typeof step;
141
- declare const index_trigger: typeof trigger;
129
+ declare const index$1_createMockElbFn: typeof createMockElbFn;
130
+ declare const index$1_createTrigger: typeof createTrigger;
131
+ declare const index$1_fullConsentCustomMapped: typeof fullConsentCustomMapped;
132
+ declare const index$1_fullConsentMapped: typeof fullConsentMapped;
133
+ declare const index$1_fullConsentUpperCase: typeof fullConsentUpperCase;
134
+ declare const index$1_implicitConsent: typeof implicitConsent;
135
+ declare const index$1_minimalConsentMapped: typeof minimalConsentMapped;
136
+ declare const index$1_nonConsentEvent: typeof nonConsentEvent;
137
+ declare const index$1_noopLogger: typeof noopLogger;
138
+ declare const index$1_partialConsent: typeof partialConsent;
139
+ declare const index$1_partialConsentMapped: typeof partialConsentMapped;
140
+ declare const index$1_serviceLevelConsent: typeof serviceLevelConsent;
141
+ declare const index$1_serviceLevelMapped: typeof serviceLevelMapped;
142
+ declare const index$1_step: typeof step;
143
+ declare const index$1_trigger: typeof trigger;
144
+ declare namespace index$1 {
145
+ export { index$1_createMockElbFn as createMockElbFn, index$1_createTrigger as createTrigger, fullConsent$1 as fullConsent, index$1_fullConsentCustomMapped as fullConsentCustomMapped, index$1_fullConsentMapped as fullConsentMapped, index$1_fullConsentUpperCase as fullConsentUpperCase, index$1_implicitConsent as implicitConsent, minimalConsent$1 as minimalConsent, index$1_minimalConsentMapped as minimalConsentMapped, index$1_nonConsentEvent as nonConsentEvent, index$1_noopLogger as noopLogger, index$1_partialConsent as partialConsent, index$1_partialConsentMapped as partialConsentMapped, index$1_serviceLevelConsent as serviceLevelConsent, index$1_serviceLevelMapped as serviceLevelMapped, index$1_step as step, index$1_trigger as trigger };
146
+ }
147
+
148
+ /**
149
+ * Usercentrics source settings schema
150
+ */
151
+ declare const SettingsSchema: z.ZodObject<{
152
+ eventName: z.ZodOptional<z.ZodString>;
153
+ categoryMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
154
+ explicitOnly: z.ZodOptional<z.ZodBoolean>;
155
+ }, z.core.$strip>;
156
+ type Settings = z.infer<typeof SettingsSchema>;
157
+
158
+ declare const settings: _walkeros_core_dev.JSONSchema;
159
+
160
+ type index_Settings = Settings;
161
+ declare const index_SettingsSchema: typeof SettingsSchema;
162
+ declare const index_settings: typeof settings;
142
163
  declare namespace index {
143
- export { index_createMockElbFn as createMockElbFn, index_createTrigger as createTrigger, fullConsent$1 as fullConsent, index_fullConsentCustomMapped as fullConsentCustomMapped, index_fullConsentMapped as fullConsentMapped, index_fullConsentUpperCase as fullConsentUpperCase, index_implicitConsent as implicitConsent, minimalConsent$1 as minimalConsent, index_minimalConsentMapped as minimalConsentMapped, index_nonConsentEvent as nonConsentEvent, index_noopLogger as noopLogger, index_partialConsent as partialConsent, index_partialConsentMapped as partialConsentMapped, index_serviceLevelConsent as serviceLevelConsent, index_serviceLevelMapped as serviceLevelMapped, index_step as step, index_trigger as trigger };
164
+ export { type index_Settings as Settings, index_SettingsSchema as SettingsSchema, index_settings as settings };
144
165
  }
145
166
 
146
- export { index as examples };
167
+ export { index$1 as examples, index as schemas };
package/dist/dev.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import { WalkerOS, Elb, Logger, Flow, Trigger } from '@walkeros/core';
2
+ import * as _walkeros_core_dev from '@walkeros/core/dev';
3
+ import { z } from '@walkeros/core/dev';
2
4
 
3
5
  /**
4
6
  * Usercentrics consent event detail structure.
@@ -124,23 +126,42 @@ declare const createTrigger: Trigger.CreateFn<UsercentricsContent, void>;
124
126
  /** Dispatches ucEvent CustomEvent after source init (post-init trigger). */
125
127
  declare const trigger: (input: unknown, env: Record<string, unknown>) => void | (() => void);
126
128
 
127
- declare const index_createMockElbFn: typeof createMockElbFn;
128
- declare const index_createTrigger: typeof createTrigger;
129
- declare const index_fullConsentCustomMapped: typeof fullConsentCustomMapped;
130
- declare const index_fullConsentMapped: typeof fullConsentMapped;
131
- declare const index_fullConsentUpperCase: typeof fullConsentUpperCase;
132
- declare const index_implicitConsent: typeof implicitConsent;
133
- declare const index_minimalConsentMapped: typeof minimalConsentMapped;
134
- declare const index_nonConsentEvent: typeof nonConsentEvent;
135
- declare const index_noopLogger: typeof noopLogger;
136
- declare const index_partialConsent: typeof partialConsent;
137
- declare const index_partialConsentMapped: typeof partialConsentMapped;
138
- declare const index_serviceLevelConsent: typeof serviceLevelConsent;
139
- declare const index_serviceLevelMapped: typeof serviceLevelMapped;
140
- declare const index_step: typeof step;
141
- declare const index_trigger: typeof trigger;
129
+ declare const index$1_createMockElbFn: typeof createMockElbFn;
130
+ declare const index$1_createTrigger: typeof createTrigger;
131
+ declare const index$1_fullConsentCustomMapped: typeof fullConsentCustomMapped;
132
+ declare const index$1_fullConsentMapped: typeof fullConsentMapped;
133
+ declare const index$1_fullConsentUpperCase: typeof fullConsentUpperCase;
134
+ declare const index$1_implicitConsent: typeof implicitConsent;
135
+ declare const index$1_minimalConsentMapped: typeof minimalConsentMapped;
136
+ declare const index$1_nonConsentEvent: typeof nonConsentEvent;
137
+ declare const index$1_noopLogger: typeof noopLogger;
138
+ declare const index$1_partialConsent: typeof partialConsent;
139
+ declare const index$1_partialConsentMapped: typeof partialConsentMapped;
140
+ declare const index$1_serviceLevelConsent: typeof serviceLevelConsent;
141
+ declare const index$1_serviceLevelMapped: typeof serviceLevelMapped;
142
+ declare const index$1_step: typeof step;
143
+ declare const index$1_trigger: typeof trigger;
144
+ declare namespace index$1 {
145
+ export { index$1_createMockElbFn as createMockElbFn, index$1_createTrigger as createTrigger, fullConsent$1 as fullConsent, index$1_fullConsentCustomMapped as fullConsentCustomMapped, index$1_fullConsentMapped as fullConsentMapped, index$1_fullConsentUpperCase as fullConsentUpperCase, index$1_implicitConsent as implicitConsent, minimalConsent$1 as minimalConsent, index$1_minimalConsentMapped as minimalConsentMapped, index$1_nonConsentEvent as nonConsentEvent, index$1_noopLogger as noopLogger, index$1_partialConsent as partialConsent, index$1_partialConsentMapped as partialConsentMapped, index$1_serviceLevelConsent as serviceLevelConsent, index$1_serviceLevelMapped as serviceLevelMapped, index$1_step as step, index$1_trigger as trigger };
146
+ }
147
+
148
+ /**
149
+ * Usercentrics source settings schema
150
+ */
151
+ declare const SettingsSchema: z.ZodObject<{
152
+ eventName: z.ZodOptional<z.ZodString>;
153
+ categoryMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
154
+ explicitOnly: z.ZodOptional<z.ZodBoolean>;
155
+ }, z.core.$strip>;
156
+ type Settings = z.infer<typeof SettingsSchema>;
157
+
158
+ declare const settings: _walkeros_core_dev.JSONSchema;
159
+
160
+ type index_Settings = Settings;
161
+ declare const index_SettingsSchema: typeof SettingsSchema;
162
+ declare const index_settings: typeof settings;
142
163
  declare namespace index {
143
- export { index_createMockElbFn as createMockElbFn, index_createTrigger as createTrigger, fullConsent$1 as fullConsent, index_fullConsentCustomMapped as fullConsentCustomMapped, index_fullConsentMapped as fullConsentMapped, index_fullConsentUpperCase as fullConsentUpperCase, index_implicitConsent as implicitConsent, minimalConsent$1 as minimalConsent, index_minimalConsentMapped as minimalConsentMapped, index_nonConsentEvent as nonConsentEvent, index_noopLogger as noopLogger, index_partialConsent as partialConsent, index_partialConsentMapped as partialConsentMapped, index_serviceLevelConsent as serviceLevelConsent, index_serviceLevelMapped as serviceLevelMapped, index_step as step, index_trigger as trigger };
164
+ export { type index_Settings as Settings, index_SettingsSchema as SettingsSchema, index_settings as settings };
144
165
  }
145
166
 
146
- export { index as examples };
167
+ export { index$1 as examples, index as schemas };
package/dist/dev.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i=(e,n)=>{for(var a in n)t(e,a,{get:n[a],enumerable:!0})},s={};i(s,{examples:()=>r}),module.exports=(e=s,((e,i,s,r)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let l of a(i))o.call(e,l)||l===s||t(e,l,{get:()=>i[l],enumerable:!(r=n(i,l))||r.enumerable});return e})(t({},"__esModule",{value:!0}),e));var r={};i(r,{createMockElbFn:()=>A,createTrigger:()=>j,fullConsent:()=>l,fullConsentCustomMapped:()=>d,fullConsentMapped:()=>v,fullConsentUpperCase:()=>p,implicitConsent:()=>u,minimalConsent:()=>g,minimalConsentMapped:()=>C,nonConsentEvent:()=>y,noopLogger:()=>E,partialConsent:()=>c,partialConsentMapped:()=>f,serviceLevelConsent:()=>m,serviceLevelMapped:()=>k,step:()=>w,trigger:()=>N});var l={event:"consent_status",type:"explicit",action:"onAcceptAllServices",ucCategory:{essential:!0,functional:!0,marketing:!0},"Google Analytics":!0,"Google Ads Remarketing":!0},c={event:"consent_status",type:"explicit",action:"onUpdateServices",ucCategory:{essential:!0,functional:!0,marketing:!1},"Google Analytics":!0,"Google Ads Remarketing":!1},g={event:"consent_status",type:"explicit",action:"onDenyAllServices",ucCategory:{essential:!0,functional:!1,marketing:!1},"Google Analytics":!1,"Google Ads Remarketing":!1},u={event:"consent_status",type:"implicit",ucCategory:{essential:!0,functional:!1,marketing:!1},"Google Analytics":!1,"Google Ads Remarketing":!1},p={event:"consent_status",type:"EXPLICIT",action:"onAcceptAllServices",ucCategory:{essential:!0,functional:!0,marketing:!0}},m={event:"consent_status",type:"explicit",action:"onUpdateServices",ucCategory:{essential:!0,functional:"partial",marketing:"partial"},"Google Analytics":!0,"Google Ads Remarketing":!1,Hotjar:!0},y={event:"other_event",type:"explicit"},v={essential:!0,functional:!0,marketing:!0},f={essential:!0,functional:!0,marketing:!1},C={essential:!0,functional:!1,marketing:!1},d={functional:!0,marketing:!0},k={essential:!0,google_analytics:!0,google_ads_remarketing:!1,hotjar:!0},_=()=>{},A=()=>()=>Promise.resolve({ok:!0}),E={error:_,warn:_,info:_,debug:_,throw:e=>{throw"string"==typeof e?new Error(e):e},json:_,scope:()=>E},w={};i(w,{categoryMapOverride:()=>S,customEventName:()=>G,fullConsent:()=>b,minimalConsent:()=>x});var b={trigger:{type:"consent"},in:{event:"consent_status",type:"explicit",action:"onAcceptAllServices",ucCategory:{essential:!0,functional:!0,marketing:!0}},out:{essential:!0,functional:!0,marketing:!0}},x={trigger:{type:"consent"},in:{event:"consent_status",type:"explicit",action:"onDenyAllServices",ucCategory:{essential:!0,functional:!1,marketing:!1}},out:{essential:!0,functional:!1,marketing:!1}},S={description:"Custom categoryMap remaps essential to functional and functional to analytics",trigger:{type:"consent"},in:{event:"consent_status",type:"explicit",ucCategory:{essential:!0,functional:!0,marketing:!1}},mapping:{categoryMap:{essential:"functional",functional:"analytics"}},out:{functional:!0,analytics:!0,marketing:!1}},G={description:"Using UC_SDK_EVENT instead of ucEvent for Usercentrics SDK v2",trigger:{type:"consent",options:{eventName:"UC_SDK_EVENT"}},in:{event:"consent_status",type:"explicit",ucCategory:{essential:!0,functional:!0,marketing:!0}},mapping:{eventName:"UC_SDK_EVENT"},out:{essential:!0,functional:!0,marketing:!0}},M=require("@walkeros/collector"),j=async e=>{let t;return{get flow(){return t},trigger:(n,a)=>async n=>{var o;if(!t){const n=await(0,M.startFlow)({...e,run:null==(o=e.run)||o});t={collector:n.collector,elb:n.elb}}const i=(null==a?void 0:a.eventName)||"ucEvent";window.dispatchEvent(new CustomEvent(i,{detail:n}))}}},N=(e,t)=>{if(e&&"object"==typeof e)return()=>{t.window.dispatchEvent(new CustomEvent("ucEvent",{detail:e}))}};//# sourceMappingURL=dev.js.map
1
+ "use strict";var e,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})},s={};a(s,{examples:()=>r,schemas:()=>O}),module.exports=(e=s,((e,a,s,r)=>{if(a&&"object"==typeof a||"function"==typeof a)for(let l of o(a))i.call(e,l)||l===s||t(e,l,{get:()=>a[l],enumerable:!(r=n(a,l))||r.enumerable});return e})(t({},"__esModule",{value:!0}),e));var r={};a(r,{createMockElbFn:()=>_,createTrigger:()=>U,fullConsent:()=>l,fullConsentCustomMapped:()=>k,fullConsentMapped:()=>y,fullConsentUpperCase:()=>u,implicitConsent:()=>p,minimalConsent:()=>g,minimalConsentMapped:()=>d,nonConsentEvent:()=>v,noopLogger:()=>b,partialConsent:()=>c,partialConsentMapped:()=>f,serviceLevelConsent:()=>m,serviceLevelMapped:()=>C,step:()=>E,trigger:()=>D});var l={event:"consent_status",type:"explicit",action:"onAcceptAllServices",ucCategory:{essential:!0,functional:!0,marketing:!0},"Google Analytics":!0,"Google Ads Remarketing":!0},c={event:"consent_status",type:"explicit",action:"onUpdateServices",ucCategory:{essential:!0,functional:!0,marketing:!1},"Google Analytics":!0,"Google Ads Remarketing":!1},g={event:"consent_status",type:"explicit",action:"onDenyAllServices",ucCategory:{essential:!0,functional:!1,marketing:!1},"Google Analytics":!1,"Google Ads Remarketing":!1},p={event:"consent_status",type:"implicit",ucCategory:{essential:!0,functional:!1,marketing:!1},"Google Analytics":!1,"Google Ads Remarketing":!1},u={event:"consent_status",type:"EXPLICIT",action:"onAcceptAllServices",ucCategory:{essential:!0,functional:!0,marketing:!0}},m={event:"consent_status",type:"explicit",action:"onUpdateServices",ucCategory:{essential:!0,functional:"partial",marketing:"partial"},"Google Analytics":!0,"Google Ads Remarketing":!1,Hotjar:!0},v={event:"other_event",type:"explicit"},y={essential:!0,functional:!0,marketing:!0},f={essential:!0,functional:!0,marketing:!1},d={essential:!0,functional:!1,marketing:!1},k={functional:!0,marketing:!0},C={essential:!0,google_analytics:!0,google_ads_remarketing:!1,hotjar:!0},w=()=>{},_=()=>()=>Promise.resolve({ok:!0}),b={error:w,warn:w,info:w,debug:w,throw:e=>{throw"string"==typeof e?new Error(e):e},json:w,scope:()=>b},E={};a(E,{categoryMapOverride:()=>h,customEventName:()=>M,fullConsent:()=>S,minimalConsent:()=>A});var S={trigger:{type:"consent"},in:{event:"consent_status",type:"explicit",action:"onAcceptAllServices",ucCategory:{essential:!0,functional:!0,marketing:!0}},out:[["elb","walker consent",{essential:!0,functional:!0,marketing:!0}]]},A={trigger:{type:"consent"},in:{event:"consent_status",type:"explicit",action:"onDenyAllServices",ucCategory:{essential:!0,functional:!1,marketing:!1}},out:[["elb","walker consent",{essential:!0,functional:!1,marketing:!1}]]},h={description:"Custom categoryMap remaps essential to functional and functional to analytics",trigger:{type:"consent"},in:{event:"consent_status",type:"explicit",ucCategory:{essential:!0,functional:!0,marketing:!1}},mapping:{categoryMap:{essential:"functional",functional:"analytics"}},out:[["elb","walker consent",{functional:!0,analytics:!0,marketing:!1}]]},M={description:"Using UC_SDK_EVENT instead of ucEvent for Usercentrics SDK v2",trigger:{type:"consent",options:{eventName:"UC_SDK_EVENT"}},in:{event:"consent_status",type:"explicit",ucCategory:{essential:!0,functional:!0,marketing:!0}},mapping:{eventName:"UC_SDK_EVENT"},out:[["elb","walker consent",{essential:!0,functional:!0,marketing:!0}]]},x=require("@walkeros/collector"),U=async e=>{let t;return{get flow(){return t},trigger:(n,o)=>async n=>{var i;if(!t){const n=await(0,x.startFlow)({...e,run:null==(i=e.run)||i});t={collector:n.collector,elb:n.elb}}const a=(null==o?void 0:o.eventName)||"ucEvent";window.dispatchEvent(new CustomEvent(a,{detail:n}))}}},D=(e,t)=>{if(e&&"object"==typeof e)return()=>{t.window.dispatchEvent(new CustomEvent("ucEvent",{detail:e}))}},O={};a(O,{SettingsSchema:()=>N,settings:()=>P});var j=require("@walkeros/core/dev"),G=require("@walkeros/core/dev"),N=G.z.object({eventName:G.z.string().describe("Window event name to listen for, configured in the Usercentrics admin (Implementation > Data Layer & Events). Use 'UC_SDK_EVENT' for the built-in Browser SDK event. Default: 'ucEvent'.").optional(),categoryMap:G.z.record(G.z.string(),G.z.string()).describe("Map the CMP's consent categories (keys) to walkerOS consent groups (values).").optional(),explicitOnly:G.z.boolean().describe("Only process consent_status events where type is 'explicit'. Ignores implicit/default page-load events. Default: true.").optional()}).meta({id:"UsercentricsSettings",title:"Settings",description:"Settings for the Usercentrics CMP source."}),P=(0,j.zodToSchema)(N);//# sourceMappingURL=dev.js.map
package/dist/dev.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dev.ts","../src/examples/index.ts","../src/examples/inputs.ts","../src/examples/outputs.ts","../src/examples/env.ts","../src/examples/step.ts","../src/examples/trigger.ts"],"sourcesContent":["/**\n * Development exports for testing and tooling.\n */\nexport * as examples from './examples';\n","export * from './inputs';\nexport * from './outputs';\nexport * from './env';\nexport * as step from './step';\nexport { createTrigger, trigger } from './trigger';\n","import type { UsercentricsEventDetail } from '../types';\n\n/**\n * Example Usercentrics consent event detail inputs.\n *\n * These represent real event.detail payloads from Usercentrics CMP.\n */\n\n/**\n * Full consent - user accepted all categories (explicit)\n */\nexport const fullConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onAcceptAllServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n 'Google Analytics': true,\n 'Google Ads Remarketing': true,\n};\n\n/**\n * Partial consent - user accepted only essential and functional (explicit)\n */\nexport const partialConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onUpdateServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: false,\n },\n 'Google Analytics': true,\n 'Google Ads Remarketing': false,\n};\n\n/**\n * Minimal consent - user denied everything except essential (explicit)\n */\nexport const minimalConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onDenyAllServices',\n ucCategory: {\n essential: true,\n functional: false,\n marketing: false,\n },\n 'Google Analytics': false,\n 'Google Ads Remarketing': false,\n};\n\n/**\n * Implicit consent - page load with default consent state\n * (not an explicit user choice)\n */\nexport const implicitConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'implicit',\n ucCategory: {\n essential: true,\n functional: false,\n marketing: false,\n },\n 'Google Analytics': false,\n 'Google Ads Remarketing': false,\n};\n\n/**\n * Explicit consent with uppercase type field (Usercentrics docs are\n * inconsistent about casing - some show 'EXPLICIT', others 'explicit')\n */\nexport const fullConsentUpperCase: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'EXPLICIT',\n action: 'onAcceptAllServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n};\n\n/**\n * Service-level consent - ucCategory has mixed types (non-boolean values\n * indicate individual service-level choice rather than group-level)\n */\nexport const serviceLevelConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onUpdateServices',\n ucCategory: {\n essential: true,\n functional: 'partial', // Non-boolean indicates mixed service choices\n marketing: 'partial',\n },\n 'Google Analytics': true,\n 'Google Ads Remarketing': false,\n Hotjar: true,\n};\n\n/**\n * Non-consent event (should be ignored)\n */\nexport const nonConsentEvent: UsercentricsEventDetail = {\n event: 'other_event',\n type: 'explicit',\n};\n","import type { WalkerOS } from '@walkeros/core';\n\n/**\n * Expected walkerOS consent outputs.\n *\n * These represent the consent state after parsing Usercentrics event details\n * with no category mapping configured (pass-through).\n */\n\n/**\n * Full consent - all categories true (group-level)\n */\nexport const fullConsentMapped: WalkerOS.Consent = {\n essential: true,\n functional: true,\n marketing: true,\n};\n\n/**\n * Partial consent - essential and functional true, marketing false\n */\nexport const partialConsentMapped: WalkerOS.Consent = {\n essential: true,\n functional: true,\n marketing: false,\n};\n\n/**\n * Minimal consent - only essential true\n */\nexport const minimalConsentMapped: WalkerOS.Consent = {\n essential: true,\n functional: false,\n marketing: false,\n};\n\n/**\n * Full consent with custom category mapping applied\n * (essential->functional, functional->functional, marketing->marketing)\n */\nexport const fullConsentCustomMapped: WalkerOS.Consent = {\n functional: true,\n marketing: true,\n};\n\n/**\n * Service-level consent - individual service booleans + boolean ucCategory entries\n * (services normalized: lowercase, spaces to underscores)\n * (ucCategory boolean entries mapped through categoryMap)\n */\nexport const serviceLevelMapped: WalkerOS.Consent = {\n essential: true,\n google_analytics: true,\n google_ads_remarketing: false,\n hotjar: true,\n};\n","import type { Elb, Logger } from '@walkeros/core';\n\n/**\n * Example environment configurations for Usercentrics source testing.\n */\n\nconst noop = () => {};\n\n/**\n * Create a properly typed elb/push function mock\n */\nexport const createMockElbFn = (): Elb.Fn => {\n const fn = (() =>\n Promise.resolve({\n ok: true,\n })) as Elb.Fn;\n return fn;\n};\n\n/**\n * Simple no-op logger for demo purposes\n */\nexport const noopLogger: Logger.Instance = {\n error: noop,\n warn: noop,\n info: noop,\n debug: noop,\n throw: (message: string | Error) => {\n throw typeof message === 'string' ? new Error(message) : message;\n },\n json: noop,\n scope: () => noopLogger,\n};\n","import type { Flow } from '@walkeros/core';\n\nexport const fullConsent: Flow.StepExample = {\n trigger: { type: 'consent' },\n in: {\n event: 'consent_status',\n type: 'explicit',\n action: 'onAcceptAllServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n },\n out: {\n essential: true,\n functional: true,\n marketing: true,\n },\n};\n\nexport const minimalConsent: Flow.StepExample = {\n trigger: { type: 'consent' },\n in: {\n event: 'consent_status',\n type: 'explicit',\n action: 'onDenyAllServices',\n ucCategory: {\n essential: true,\n functional: false,\n marketing: false,\n },\n },\n out: {\n essential: true,\n functional: false,\n marketing: false,\n },\n};\n\nexport const categoryMapOverride: Flow.StepExample = {\n description:\n 'Custom categoryMap remaps essential to functional and functional to analytics',\n trigger: { type: 'consent' },\n in: {\n event: 'consent_status',\n type: 'explicit',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: false,\n },\n },\n mapping: {\n categoryMap: { essential: 'functional', functional: 'analytics' },\n },\n out: {\n functional: true,\n analytics: true,\n marketing: false,\n },\n};\n\nexport const customEventName: Flow.StepExample = {\n description: 'Using UC_SDK_EVENT instead of ucEvent for Usercentrics SDK v2',\n trigger: { type: 'consent', options: { eventName: 'UC_SDK_EVENT' } },\n in: {\n event: 'consent_status',\n type: 'explicit',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n },\n mapping: { eventName: 'UC_SDK_EVENT' },\n out: {\n essential: true,\n functional: true,\n marketing: true,\n },\n};\n","import type { Trigger, Collector } from '@walkeros/core';\nimport { startFlow } from '@walkeros/collector';\n\ninterface UsercentricsContent {\n event: string;\n type: string;\n action?: string;\n ucCategory?: Record<string, boolean | unknown>;\n [service: string]: unknown;\n}\n\nconst createTrigger: Trigger.CreateFn<UsercentricsContent, void> = async (\n config: Collector.InitConfig,\n) => {\n let flow: Trigger.FlowHandle | undefined;\n\n const trigger: Trigger.Fn<UsercentricsContent, void> =\n (type?: string, opts?: unknown) => async (content: UsercentricsContent) => {\n // Lazy startFlow — source registers ucEvent listener during init\n if (!flow) {\n const result = await startFlow({ ...config, run: config.run ?? true });\n flow = { collector: result.collector, elb: result.elb };\n }\n\n // Dispatch the CMP event — source's listener catches it\n const eventName =\n (opts as { eventName?: string })?.eventName || 'ucEvent';\n window.dispatchEvent(new CustomEvent(eventName, { detail: content }));\n };\n\n return {\n get flow() {\n return flow;\n },\n trigger,\n };\n};\n\n/** Dispatches ucEvent CustomEvent after source init (post-init trigger). */\nconst trigger = (\n input: unknown,\n env: Record<string, unknown>,\n): void | (() => void) => {\n if (!input || typeof input !== 'object') return;\n return () => {\n (env.window as Window).dispatchEvent(\n new CustomEvent('ucEvent', { detail: input }),\n );\n };\n};\n\nexport { createTrigger, trigger };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACWO,IAAM,cAAuC;AAAA,EAClD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,EACb;AAAA,EACA,oBAAoB;AAAA,EACpB,0BAA0B;AAC5B;AAKO,IAAM,iBAA0C;AAAA,EACrD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,EACb;AAAA,EACA,oBAAoB;AAAA,EACpB,0BAA0B;AAC5B;AAKO,IAAM,iBAA0C;AAAA,EACrD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,EACb;AAAA,EACA,oBAAoB;AAAA,EACpB,0BAA0B;AAC5B;AAMO,IAAM,kBAA2C;AAAA,EAC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a;AAAA,EACb,SAAS,EAAE,MAAM,WAAW,SAAS,EAAE,WAAW,eAAe,EAAE;AAAA,EACnE,IAAI;AAAA,IACF,OAAO;AAAA,IACP,MAAM;AAAA,IACN,YAAY;AAAA,MACV,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,SAAS,EAAE,WAAW,eAAe;AAAA,EACrC,KAAK;AAAA,IACH,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,EACb;AACF;;;AChFA,uBAA0B;AAU1B,IAAM,gBAA6D,OACjE,WACG;AACH,MAAI;AAEJ,QAAMC,WACJ,CAAC,MAAe,SAAmB,OAAO,YAAiC;AAjB/E;AAmBM,QAAI,CAAC,MAAM;AACT,YAAM,SAAS,UAAM,4BAAU,EAAE,GAAG,QAAQ,MAAK,YAAO,QAAP,YAAc,KAAK,CAAC;AACrE,aAAO,EAAE,WAAW,OAAO,WAAW,KAAK,OAAO,IAAI;AAAA,IACxD;AAGA,UAAM,aACH,6BAAiC,cAAa;AACjD,WAAO,cAAc,IAAI,YAAY,WAAW,EAAE,QAAQ,QAAQ,CAAC,CAAC;AAAA,EACtE;AAEF,SAAO;AAAA,IACL,IAAI,OAAO;AACT,aAAO;AAAA,IACT;AAAA,IACA,SAAAA;AAAA,EACF;AACF;AAGA,IAAM,UAAU,CACd,OACA,QACwB;AACxB,MAAI,CAAC,SAAS,OAAO,UAAU,SAAU;AACzC,SAAO,MAAM;AACX,IAAC,IAAI,OAAkB;AAAA,MACrB,IAAI,YAAY,WAAW,EAAE,QAAQ,MAAM,CAAC;AAAA,IAC9C;AAAA,EACF;AACF;","names":["fullConsent","minimalConsent","trigger"]}
1
+ {"version":3,"sources":["../src/dev.ts","../src/examples/index.ts","../src/examples/inputs.ts","../src/examples/outputs.ts","../src/examples/env.ts","../src/examples/step.ts","../src/examples/trigger.ts","../src/schemas/index.ts","../src/schemas/settings.ts"],"sourcesContent":["/**\n * Development exports for testing and tooling.\n */\nexport * as examples from './examples';\nexport * as schemas from './schemas';\n","export * from './inputs';\nexport * from './outputs';\nexport * from './env';\nexport * as step from './step';\nexport { createTrigger, trigger } from './trigger';\n","import type { UsercentricsEventDetail } from '../types';\n\n/**\n * Example Usercentrics consent event detail inputs.\n *\n * These represent real event.detail payloads from Usercentrics CMP.\n */\n\n/**\n * Full consent - user accepted all categories (explicit)\n */\nexport const fullConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onAcceptAllServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n 'Google Analytics': true,\n 'Google Ads Remarketing': true,\n};\n\n/**\n * Partial consent - user accepted only essential and functional (explicit)\n */\nexport const partialConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onUpdateServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: false,\n },\n 'Google Analytics': true,\n 'Google Ads Remarketing': false,\n};\n\n/**\n * Minimal consent - user denied everything except essential (explicit)\n */\nexport const minimalConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onDenyAllServices',\n ucCategory: {\n essential: true,\n functional: false,\n marketing: false,\n },\n 'Google Analytics': false,\n 'Google Ads Remarketing': false,\n};\n\n/**\n * Implicit consent - page load with default consent state\n * (not an explicit user choice)\n */\nexport const implicitConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'implicit',\n ucCategory: {\n essential: true,\n functional: false,\n marketing: false,\n },\n 'Google Analytics': false,\n 'Google Ads Remarketing': false,\n};\n\n/**\n * Explicit consent with uppercase type field (Usercentrics docs are\n * inconsistent about casing - some show 'EXPLICIT', others 'explicit')\n */\nexport const fullConsentUpperCase: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'EXPLICIT',\n action: 'onAcceptAllServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n};\n\n/**\n * Service-level consent - ucCategory has mixed types (non-boolean values\n * indicate individual service-level choice rather than group-level)\n */\nexport const serviceLevelConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onUpdateServices',\n ucCategory: {\n essential: true,\n functional: 'partial', // Non-boolean indicates mixed service choices\n marketing: 'partial',\n },\n 'Google Analytics': true,\n 'Google Ads Remarketing': false,\n Hotjar: true,\n};\n\n/**\n * Non-consent event (should be ignored)\n */\nexport const nonConsentEvent: UsercentricsEventDetail = {\n event: 'other_event',\n type: 'explicit',\n};\n","import type { WalkerOS } from '@walkeros/core';\n\n/**\n * Expected walkerOS consent outputs.\n *\n * These represent the consent state after parsing Usercentrics event details\n * with no category mapping configured (pass-through).\n */\n\n/**\n * Full consent - all categories true (group-level)\n */\nexport const fullConsentMapped: WalkerOS.Consent = {\n essential: true,\n functional: true,\n marketing: true,\n};\n\n/**\n * Partial consent - essential and functional true, marketing false\n */\nexport const partialConsentMapped: WalkerOS.Consent = {\n essential: true,\n functional: true,\n marketing: false,\n};\n\n/**\n * Minimal consent - only essential true\n */\nexport const minimalConsentMapped: WalkerOS.Consent = {\n essential: true,\n functional: false,\n marketing: false,\n};\n\n/**\n * Full consent with custom category mapping applied\n * (essential->functional, functional->functional, marketing->marketing)\n */\nexport const fullConsentCustomMapped: WalkerOS.Consent = {\n functional: true,\n marketing: true,\n};\n\n/**\n * Service-level consent - individual service booleans + boolean ucCategory entries\n * (services normalized: lowercase, spaces to underscores)\n * (ucCategory boolean entries mapped through categoryMap)\n */\nexport const serviceLevelMapped: WalkerOS.Consent = {\n essential: true,\n google_analytics: true,\n google_ads_remarketing: false,\n hotjar: true,\n};\n","import type { Elb, Logger } from '@walkeros/core';\n\n/**\n * Example environment configurations for Usercentrics source testing.\n */\n\nconst noop = () => {};\n\n/**\n * Create a properly typed elb/push function mock\n */\nexport const createMockElbFn = (): Elb.Fn => {\n const fn = (() =>\n Promise.resolve({\n ok: true,\n })) as Elb.Fn;\n return fn;\n};\n\n/**\n * Simple no-op logger for demo purposes\n */\nexport const noopLogger: Logger.Instance = {\n error: noop,\n warn: noop,\n info: noop,\n debug: noop,\n throw: (message: string | Error) => {\n throw typeof message === 'string' ? new Error(message) : message;\n },\n json: noop,\n scope: () => noopLogger,\n};\n","import type { Flow } from '@walkeros/core';\n\nexport const fullConsent: Flow.StepExample = {\n trigger: { type: 'consent' },\n in: {\n event: 'consent_status',\n type: 'explicit',\n action: 'onAcceptAllServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n },\n out: [\n [\n 'elb',\n 'walker consent',\n {\n essential: true,\n functional: true,\n marketing: true,\n },\n ],\n ],\n};\n\nexport const minimalConsent: Flow.StepExample = {\n trigger: { type: 'consent' },\n in: {\n event: 'consent_status',\n type: 'explicit',\n action: 'onDenyAllServices',\n ucCategory: {\n essential: true,\n functional: false,\n marketing: false,\n },\n },\n out: [\n [\n 'elb',\n 'walker consent',\n {\n essential: true,\n functional: false,\n marketing: false,\n },\n ],\n ],\n};\n\nexport const categoryMapOverride: Flow.StepExample = {\n description:\n 'Custom categoryMap remaps essential to functional and functional to analytics',\n trigger: { type: 'consent' },\n in: {\n event: 'consent_status',\n type: 'explicit',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: false,\n },\n },\n mapping: {\n categoryMap: { essential: 'functional', functional: 'analytics' },\n },\n out: [\n [\n 'elb',\n 'walker consent',\n {\n functional: true,\n analytics: true,\n marketing: false,\n },\n ],\n ],\n};\n\nexport const customEventName: Flow.StepExample = {\n description: 'Using UC_SDK_EVENT instead of ucEvent for Usercentrics SDK v2',\n trigger: { type: 'consent', options: { eventName: 'UC_SDK_EVENT' } },\n in: {\n event: 'consent_status',\n type: 'explicit',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n },\n mapping: { eventName: 'UC_SDK_EVENT' },\n out: [\n [\n 'elb',\n 'walker consent',\n {\n essential: true,\n functional: true,\n marketing: true,\n },\n ],\n ],\n};\n","import type { Trigger, Collector } from '@walkeros/core';\nimport { startFlow } from '@walkeros/collector';\n\ninterface UsercentricsContent {\n event: string;\n type: string;\n action?: string;\n ucCategory?: Record<string, boolean | unknown>;\n [service: string]: unknown;\n}\n\nconst createTrigger: Trigger.CreateFn<UsercentricsContent, void> = async (\n config: Collector.InitConfig,\n) => {\n let flow: Trigger.FlowHandle | undefined;\n\n const trigger: Trigger.Fn<UsercentricsContent, void> =\n (type?: string, opts?: unknown) => async (content: UsercentricsContent) => {\n // Lazy startFlow — source registers ucEvent listener during init\n if (!flow) {\n const result = await startFlow({ ...config, run: config.run ?? true });\n flow = { collector: result.collector, elb: result.elb };\n }\n\n // Dispatch the CMP event — source's listener catches it\n const eventName =\n (opts as { eventName?: string })?.eventName || 'ucEvent';\n window.dispatchEvent(new CustomEvent(eventName, { detail: content }));\n };\n\n return {\n get flow() {\n return flow;\n },\n trigger,\n };\n};\n\n/** Dispatches ucEvent CustomEvent after source init (post-init trigger). */\nconst trigger = (\n input: unknown,\n env: Record<string, unknown>,\n): void | (() => void) => {\n if (!input || typeof input !== 'object') return;\n return () => {\n (env.window as Window).dispatchEvent(\n new CustomEvent('ucEvent', { detail: input }),\n );\n };\n};\n\nexport { createTrigger, trigger };\n","import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\n\n// Export Zod schemas and types\nexport { SettingsSchema, type Settings } from './settings';\n\n// JSON Schema exports (for website PropertyTable and documentation tools)\nexport const settings = zodToSchema(SettingsSchema);\n","import { z } from '@walkeros/core/dev';\n\n/**\n * Usercentrics source settings schema\n */\nexport const SettingsSchema = z\n .object({\n eventName: z\n .string()\n .describe(\n \"Window event name to listen for, configured in the Usercentrics admin (Implementation > Data Layer & Events). Use 'UC_SDK_EVENT' for the built-in Browser SDK event. Default: 'ucEvent'.\",\n )\n .optional(),\n\n categoryMap: z\n .record(z.string(), z.string())\n .describe(\n \"Map the CMP's consent categories (keys) to walkerOS consent groups (values).\",\n )\n .optional(),\n\n explicitOnly: z\n .boolean()\n .describe(\n \"Only process consent_status events where type is 'explicit'. Ignores implicit/default page-load events. Default: true.\",\n )\n .optional(),\n })\n .meta({\n id: 'UsercentricsSettings',\n title: 'Settings',\n description: 'Settings for the Usercentrics CMP source.',\n });\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACWO,IAAM,cAAuC;AAAA,EAClD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,EACb;AAAA,EACA,oBAAoB;AAAA,EACpB,0BAA0B;AAC5B;AAKO,IAAM,iBAA0C;AAAA,EACrD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,EACb;AAAA,EACA,oBAAoB;AAAA,EACpB,0BAA0B;AAC5B;AAKO,IAAM,iBAA0C;AAAA,EACrD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,EACb;AAAA,EACA,oBAAoB;AAAA,EACpB,0BAA0B;AAC5B;AAMO,IAAM,kBAA2C;AAAA,EACtD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,YAAY;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,EACb;AAAA,EACA,oBAAoB;AAAA,EACpB,0BAA0B;AAC5B;AAMO,IAAM,uBAAgD;AAAA,EAC3D,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,IACV,WAAW;AAAA,IACX,YAAY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AG,aAAE,OAAO,CAAC,EAC7B;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EAEZ,cAAc,aACX,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC,EACA,KAAK;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,aAAa;AACf,CAAC;;;ADzBI,IAAM,eAAW,yBAAY,cAAc;","names":["fullConsent","minimalConsent","trigger","import_dev"]}
package/dist/dev.mjs CHANGED
@@ -1 +1 @@
1
- var e=Object.defineProperty,t=(t,n)=>{for(var a in n)e(t,a,{get:n[a],enumerable:!0})},n={};t(n,{createMockElbFn:()=>f,createTrigger:()=>x,fullConsent:()=>a,fullConsentCustomMapped:()=>m,fullConsentMapped:()=>g,fullConsentUpperCase:()=>l,implicitConsent:()=>s,minimalConsent:()=>o,minimalConsentMapped:()=>u,nonConsentEvent:()=>r,noopLogger:()=>C,partialConsent:()=>i,partialConsentMapped:()=>p,serviceLevelConsent:()=>c,serviceLevelMapped:()=>v,step:()=>d,trigger:()=>S});var a={event:"consent_status",type:"explicit",action:"onAcceptAllServices",ucCategory:{essential:!0,functional:!0,marketing:!0},"Google Analytics":!0,"Google Ads Remarketing":!0},i={event:"consent_status",type:"explicit",action:"onUpdateServices",ucCategory:{essential:!0,functional:!0,marketing:!1},"Google Analytics":!0,"Google Ads Remarketing":!1},o={event:"consent_status",type:"explicit",action:"onDenyAllServices",ucCategory:{essential:!0,functional:!1,marketing:!1},"Google Analytics":!1,"Google Ads Remarketing":!1},s={event:"consent_status",type:"implicit",ucCategory:{essential:!0,functional:!1,marketing:!1},"Google Analytics":!1,"Google Ads Remarketing":!1},l={event:"consent_status",type:"EXPLICIT",action:"onAcceptAllServices",ucCategory:{essential:!0,functional:!0,marketing:!0}},c={event:"consent_status",type:"explicit",action:"onUpdateServices",ucCategory:{essential:!0,functional:"partial",marketing:"partial"},"Google Analytics":!0,"Google Ads Remarketing":!1,Hotjar:!0},r={event:"other_event",type:"explicit"},g={essential:!0,functional:!0,marketing:!0},p={essential:!0,functional:!0,marketing:!1},u={essential:!0,functional:!1,marketing:!1},m={functional:!0,marketing:!0},v={essential:!0,google_analytics:!0,google_ads_remarketing:!1,hotjar:!0},y=()=>{},f=()=>()=>Promise.resolve({ok:!0}),C={error:y,warn:y,info:y,debug:y,throw:e=>{throw"string"==typeof e?new Error(e):e},json:y,scope:()=>C},d={};t(d,{categoryMapOverride:()=>A,customEventName:()=>E,fullConsent:()=>k,minimalConsent:()=>_});var k={trigger:{type:"consent"},in:{event:"consent_status",type:"explicit",action:"onAcceptAllServices",ucCategory:{essential:!0,functional:!0,marketing:!0}},out:{essential:!0,functional:!0,marketing:!0}},_={trigger:{type:"consent"},in:{event:"consent_status",type:"explicit",action:"onDenyAllServices",ucCategory:{essential:!0,functional:!1,marketing:!1}},out:{essential:!0,functional:!1,marketing:!1}},A={description:"Custom categoryMap remaps essential to functional and functional to analytics",trigger:{type:"consent"},in:{event:"consent_status",type:"explicit",ucCategory:{essential:!0,functional:!0,marketing:!1}},mapping:{categoryMap:{essential:"functional",functional:"analytics"}},out:{functional:!0,analytics:!0,marketing:!1}},E={description:"Using UC_SDK_EVENT instead of ucEvent for Usercentrics SDK v2",trigger:{type:"consent",options:{eventName:"UC_SDK_EVENT"}},in:{event:"consent_status",type:"explicit",ucCategory:{essential:!0,functional:!0,marketing:!0}},mapping:{eventName:"UC_SDK_EVENT"},out:{essential:!0,functional:!0,marketing:!0}};import{startFlow as w}from"@walkeros/collector";var x=async e=>{let t;return{get flow(){return t},trigger:(n,a)=>async n=>{var i;if(!t){const n=await w({...e,run:null==(i=e.run)||i});t={collector:n.collector,elb:n.elb}}const o=(null==a?void 0:a.eventName)||"ucEvent";window.dispatchEvent(new CustomEvent(o,{detail:n}))}}},S=(e,t)=>{if(e&&"object"==typeof e)return()=>{t.window.dispatchEvent(new CustomEvent("ucEvent",{detail:e}))}};export{n as examples};//# sourceMappingURL=dev.mjs.map
1
+ var e=Object.defineProperty,t=(t,n)=>{for(var i in n)e(t,i,{get:n[i],enumerable:!0})},n={};t(n,{createMockElbFn:()=>f,createTrigger:()=>A,fullConsent:()=>i,fullConsentCustomMapped:()=>m,fullConsentMapped:()=>g,fullConsentUpperCase:()=>r,implicitConsent:()=>s,minimalConsent:()=>a,minimalConsentMapped:()=>u,nonConsentEvent:()=>c,noopLogger:()=>d,partialConsent:()=>o,partialConsentMapped:()=>p,serviceLevelConsent:()=>l,serviceLevelMapped:()=>v,step:()=>k,trigger:()=>b});var i={event:"consent_status",type:"explicit",action:"onAcceptAllServices",ucCategory:{essential:!0,functional:!0,marketing:!0},"Google Analytics":!0,"Google Ads Remarketing":!0},o={event:"consent_status",type:"explicit",action:"onUpdateServices",ucCategory:{essential:!0,functional:!0,marketing:!1},"Google Analytics":!0,"Google Ads Remarketing":!1},a={event:"consent_status",type:"explicit",action:"onDenyAllServices",ucCategory:{essential:!0,functional:!1,marketing:!1},"Google Analytics":!1,"Google Ads Remarketing":!1},s={event:"consent_status",type:"implicit",ucCategory:{essential:!0,functional:!1,marketing:!1},"Google Analytics":!1,"Google Ads Remarketing":!1},r={event:"consent_status",type:"EXPLICIT",action:"onAcceptAllServices",ucCategory:{essential:!0,functional:!0,marketing:!0}},l={event:"consent_status",type:"explicit",action:"onUpdateServices",ucCategory:{essential:!0,functional:"partial",marketing:"partial"},"Google Analytics":!0,"Google Ads Remarketing":!1,Hotjar:!0},c={event:"other_event",type:"explicit"},g={essential:!0,functional:!0,marketing:!0},p={essential:!0,functional:!0,marketing:!1},u={essential:!0,functional:!1,marketing:!1},m={functional:!0,marketing:!0},v={essential:!0,google_analytics:!0,google_ads_remarketing:!1,hotjar:!0},y=()=>{},f=()=>()=>Promise.resolve({ok:!0}),d={error:y,warn:y,info:y,debug:y,throw:e=>{throw"string"==typeof e?new Error(e):e},json:y,scope:()=>d},k={};t(k,{categoryMapOverride:()=>_,customEventName:()=>E,fullConsent:()=>C,minimalConsent:()=>w});var C={trigger:{type:"consent"},in:{event:"consent_status",type:"explicit",action:"onAcceptAllServices",ucCategory:{essential:!0,functional:!0,marketing:!0}},out:[["elb","walker consent",{essential:!0,functional:!0,marketing:!0}]]},w={trigger:{type:"consent"},in:{event:"consent_status",type:"explicit",action:"onDenyAllServices",ucCategory:{essential:!0,functional:!1,marketing:!1}},out:[["elb","walker consent",{essential:!0,functional:!1,marketing:!1}]]},_={description:"Custom categoryMap remaps essential to functional and functional to analytics",trigger:{type:"consent"},in:{event:"consent_status",type:"explicit",ucCategory:{essential:!0,functional:!0,marketing:!1}},mapping:{categoryMap:{essential:"functional",functional:"analytics"}},out:[["elb","walker consent",{functional:!0,analytics:!0,marketing:!1}]]},E={description:"Using UC_SDK_EVENT instead of ucEvent for Usercentrics SDK v2",trigger:{type:"consent",options:{eventName:"UC_SDK_EVENT"}},in:{event:"consent_status",type:"explicit",ucCategory:{essential:!0,functional:!0,marketing:!0}},mapping:{eventName:"UC_SDK_EVENT"},out:[["elb","walker consent",{essential:!0,functional:!0,marketing:!0}]]};import{startFlow as S}from"@walkeros/collector";var A=async e=>{let t;return{get flow(){return t},trigger:(n,i)=>async n=>{var o;if(!t){const n=await S({...e,run:null==(o=e.run)||o});t={collector:n.collector,elb:n.elb}}const a=(null==i?void 0:i.eventName)||"ucEvent";window.dispatchEvent(new CustomEvent(a,{detail:n}))}}},b=(e,t)=>{if(e&&"object"==typeof e)return()=>{t.window.dispatchEvent(new CustomEvent("ucEvent",{detail:e}))}},h={};t(h,{SettingsSchema:()=>U,settings:()=>D});import{zodToSchema as x}from"@walkeros/core/dev";import{z as M}from"@walkeros/core/dev";var U=M.object({eventName:M.string().describe("Window event name to listen for, configured in the Usercentrics admin (Implementation > Data Layer & Events). Use 'UC_SDK_EVENT' for the built-in Browser SDK event. Default: 'ucEvent'.").optional(),categoryMap:M.record(M.string(),M.string()).describe("Map the CMP's consent categories (keys) to walkerOS consent groups (values).").optional(),explicitOnly:M.boolean().describe("Only process consent_status events where type is 'explicit'. Ignores implicit/default page-load events. Default: true.").optional()}).meta({id:"UsercentricsSettings",title:"Settings",description:"Settings for the Usercentrics CMP source."}),D=x(U);export{n as examples,h as schemas};//# sourceMappingURL=dev.mjs.map
package/dist/dev.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/examples/index.ts","../src/examples/inputs.ts","../src/examples/outputs.ts","../src/examples/env.ts","../src/examples/step.ts","../src/examples/trigger.ts"],"sourcesContent":["export * from './inputs';\nexport * from './outputs';\nexport * from './env';\nexport * as step from './step';\nexport { createTrigger, trigger } from './trigger';\n","import type { UsercentricsEventDetail } from '../types';\n\n/**\n * Example Usercentrics consent event detail inputs.\n *\n * These represent real event.detail payloads from Usercentrics CMP.\n */\n\n/**\n * Full consent - user accepted all categories (explicit)\n */\nexport const fullConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onAcceptAllServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n 'Google Analytics': true,\n 'Google Ads Remarketing': true,\n};\n\n/**\n * Partial consent - user accepted only essential and functional (explicit)\n */\nexport const partialConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onUpdateServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: false,\n },\n 'Google Analytics': true,\n 'Google Ads Remarketing': false,\n};\n\n/**\n * Minimal consent - user denied everything except essential (explicit)\n */\nexport const minimalConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onDenyAllServices',\n ucCategory: {\n essential: true,\n functional: false,\n marketing: false,\n },\n 'Google Analytics': false,\n 'Google Ads Remarketing': false,\n};\n\n/**\n * Implicit consent - page load with default consent state\n * (not an explicit user choice)\n */\nexport const implicitConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'implicit',\n ucCategory: {\n essential: true,\n functional: false,\n marketing: false,\n },\n 'Google Analytics': false,\n 'Google Ads Remarketing': false,\n};\n\n/**\n * Explicit consent with uppercase type field (Usercentrics docs are\n * inconsistent about casing - some show 'EXPLICIT', others 'explicit')\n */\nexport const fullConsentUpperCase: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'EXPLICIT',\n action: 'onAcceptAllServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n};\n\n/**\n * Service-level consent - ucCategory has mixed types (non-boolean values\n * indicate individual service-level choice rather than group-level)\n */\nexport const serviceLevelConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onUpdateServices',\n ucCategory: {\n essential: true,\n functional: 'partial', // Non-boolean indicates mixed service choices\n marketing: 'partial',\n },\n 'Google Analytics': true,\n 'Google Ads Remarketing': false,\n Hotjar: true,\n};\n\n/**\n * Non-consent event (should be ignored)\n */\nexport const nonConsentEvent: UsercentricsEventDetail = {\n event: 'other_event',\n type: 'explicit',\n};\n","import type { WalkerOS } from '@walkeros/core';\n\n/**\n * Expected walkerOS consent outputs.\n *\n * These represent the consent state after parsing Usercentrics event details\n * with no category mapping configured (pass-through).\n */\n\n/**\n * Full consent - all categories true (group-level)\n */\nexport const fullConsentMapped: WalkerOS.Consent = {\n essential: true,\n functional: true,\n marketing: true,\n};\n\n/**\n * Partial consent - essential and functional true, marketing false\n */\nexport const partialConsentMapped: WalkerOS.Consent = {\n essential: true,\n functional: true,\n marketing: false,\n};\n\n/**\n * Minimal consent - only essential true\n */\nexport const minimalConsentMapped: WalkerOS.Consent = {\n essential: true,\n functional: false,\n marketing: false,\n};\n\n/**\n * Full consent with custom category mapping applied\n * (essential->functional, functional->functional, marketing->marketing)\n */\nexport const fullConsentCustomMapped: WalkerOS.Consent = {\n functional: true,\n marketing: true,\n};\n\n/**\n * Service-level consent - individual service booleans + boolean ucCategory entries\n * (services normalized: lowercase, spaces to underscores)\n * (ucCategory boolean entries mapped through categoryMap)\n */\nexport const serviceLevelMapped: WalkerOS.Consent = {\n essential: true,\n google_analytics: true,\n google_ads_remarketing: false,\n hotjar: true,\n};\n","import type { Elb, Logger } from '@walkeros/core';\n\n/**\n * Example environment configurations for Usercentrics source testing.\n */\n\nconst noop = () => {};\n\n/**\n * Create a properly typed elb/push function mock\n */\nexport const createMockElbFn = (): Elb.Fn => {\n const fn = (() =>\n Promise.resolve({\n ok: true,\n })) as Elb.Fn;\n return fn;\n};\n\n/**\n * Simple no-op logger for demo purposes\n */\nexport const noopLogger: Logger.Instance = {\n error: noop,\n warn: noop,\n info: noop,\n debug: noop,\n throw: (message: string | Error) => {\n throw typeof message === 'string' ? new Error(message) : message;\n },\n json: noop,\n scope: () => noopLogger,\n};\n","import type { Flow } from '@walkeros/core';\n\nexport const fullConsent: Flow.StepExample = {\n trigger: { type: 'consent' },\n in: {\n event: 'consent_status',\n type: 'explicit',\n action: 'onAcceptAllServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n },\n out: {\n essential: true,\n functional: true,\n marketing: true,\n },\n};\n\nexport const minimalConsent: Flow.StepExample = {\n trigger: { type: 'consent' },\n in: {\n event: 'consent_status',\n type: 'explicit',\n action: 'onDenyAllServices',\n ucCategory: {\n essential: true,\n functional: false,\n marketing: false,\n },\n },\n out: {\n essential: true,\n functional: false,\n marketing: false,\n },\n};\n\nexport const categoryMapOverride: Flow.StepExample = {\n description:\n 'Custom categoryMap remaps essential to functional and functional to analytics',\n trigger: { type: 'consent' },\n in: {\n event: 'consent_status',\n type: 'explicit',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: false,\n },\n },\n mapping: {\n categoryMap: { essential: 'functional', functional: 'analytics' },\n },\n out: {\n functional: true,\n analytics: true,\n marketing: false,\n },\n};\n\nexport const customEventName: Flow.StepExample = {\n description: 'Using UC_SDK_EVENT instead of ucEvent for Usercentrics SDK v2',\n trigger: { type: 'consent', options: { eventName: 'UC_SDK_EVENT' } },\n in: {\n event: 'consent_status',\n type: 'explicit',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n },\n mapping: { eventName: 'UC_SDK_EVENT' },\n out: {\n essential: true,\n functional: true,\n marketing: true,\n },\n};\n","import type { Trigger, Collector } from '@walkeros/core';\nimport { startFlow } from '@walkeros/collector';\n\ninterface UsercentricsContent {\n event: string;\n type: string;\n action?: string;\n ucCategory?: Record<string, boolean | unknown>;\n [service: string]: unknown;\n}\n\nconst createTrigger: Trigger.CreateFn<UsercentricsContent, void> = async (\n config: Collector.InitConfig,\n) => {\n let flow: Trigger.FlowHandle | undefined;\n\n const trigger: Trigger.Fn<UsercentricsContent, void> =\n (type?: string, opts?: unknown) => async (content: UsercentricsContent) => {\n // Lazy startFlow — source registers ucEvent listener during init\n if (!flow) {\n const result = await startFlow({ ...config, run: config.run ?? true });\n flow = { collector: result.collector, elb: result.elb };\n }\n\n // Dispatch the CMP event — source's listener catches it\n const eventName =\n (opts as { eventName?: string })?.eventName || 'ucEvent';\n window.dispatchEvent(new CustomEvent(eventName, { detail: content }));\n };\n\n return {\n get flow() {\n return flow;\n },\n trigger,\n };\n};\n\n/** Dispatches ucEvent CustomEvent after source init (post-init trigger). */\nconst trigger = (\n input: unknown,\n env: Record<string, unknown>,\n): void | (() => void) => {\n if (!input || typeof input !== 'object') return;\n return () => {\n (env.window as Window).dispatchEvent(\n new CustomEvent('ucEvent', { detail: input }),\n );\n };\n};\n\nexport { createTrigger, trigger };\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACWO,IAAM,cAAuC;AAAA,EAClD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,EACb;AAAA,EACA,oBAAoB;AAAA,EACpB,0BAA0B;AAC5B;AAKO,IAAM,iBAA0C;AAAA,EACrD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,IACV,WAAW;AAA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C,SAAO,MAAM;AACX,IAAC,IAAI,OAAkB;AAAA,MACrB,IAAI,YAAY,WAAW,EAAE,QAAQ,MAAM,CAAC;AAAA,IAC9C;AAAA,EACF;AACF;","names":["fullConsent","minimalConsent","trigger"]}
1
+ {"version":3,"sources":["../src/examples/index.ts","../src/examples/inputs.ts","../src/examples/outputs.ts","../src/examples/env.ts","../src/examples/step.ts","../src/examples/trigger.ts","../src/schemas/index.ts","../src/schemas/settings.ts"],"sourcesContent":["export * from './inputs';\nexport * from './outputs';\nexport * from './env';\nexport * as step from './step';\nexport { createTrigger, trigger } from './trigger';\n","import type { UsercentricsEventDetail } from '../types';\n\n/**\n * Example Usercentrics consent event detail inputs.\n *\n * These represent real event.detail payloads from Usercentrics CMP.\n */\n\n/**\n * Full consent - user accepted all categories (explicit)\n */\nexport const fullConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onAcceptAllServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n 'Google Analytics': true,\n 'Google Ads Remarketing': true,\n};\n\n/**\n * Partial consent - user accepted only essential and functional (explicit)\n */\nexport const partialConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onUpdateServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: false,\n },\n 'Google Analytics': true,\n 'Google Ads Remarketing': false,\n};\n\n/**\n * Minimal consent - user denied everything except essential (explicit)\n */\nexport const minimalConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onDenyAllServices',\n ucCategory: {\n essential: true,\n functional: false,\n marketing: false,\n },\n 'Google Analytics': false,\n 'Google Ads Remarketing': false,\n};\n\n/**\n * Implicit consent - page load with default consent state\n * (not an explicit user choice)\n */\nexport const implicitConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'implicit',\n ucCategory: {\n essential: true,\n functional: false,\n marketing: false,\n },\n 'Google Analytics': false,\n 'Google Ads Remarketing': false,\n};\n\n/**\n * Explicit consent with uppercase type field (Usercentrics docs are\n * inconsistent about casing - some show 'EXPLICIT', others 'explicit')\n */\nexport const fullConsentUpperCase: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'EXPLICIT',\n action: 'onAcceptAllServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n};\n\n/**\n * Service-level consent - ucCategory has mixed types (non-boolean values\n * indicate individual service-level choice rather than group-level)\n */\nexport const serviceLevelConsent: UsercentricsEventDetail = {\n event: 'consent_status',\n type: 'explicit',\n action: 'onUpdateServices',\n ucCategory: {\n essential: true,\n functional: 'partial', // Non-boolean indicates mixed service choices\n marketing: 'partial',\n },\n 'Google Analytics': true,\n 'Google Ads Remarketing': false,\n Hotjar: true,\n};\n\n/**\n * Non-consent event (should be ignored)\n */\nexport const nonConsentEvent: UsercentricsEventDetail = {\n event: 'other_event',\n type: 'explicit',\n};\n","import type { WalkerOS } from '@walkeros/core';\n\n/**\n * Expected walkerOS consent outputs.\n *\n * These represent the consent state after parsing Usercentrics event details\n * with no category mapping configured (pass-through).\n */\n\n/**\n * Full consent - all categories true (group-level)\n */\nexport const fullConsentMapped: WalkerOS.Consent = {\n essential: true,\n functional: true,\n marketing: true,\n};\n\n/**\n * Partial consent - essential and functional true, marketing false\n */\nexport const partialConsentMapped: WalkerOS.Consent = {\n essential: true,\n functional: true,\n marketing: false,\n};\n\n/**\n * Minimal consent - only essential true\n */\nexport const minimalConsentMapped: WalkerOS.Consent = {\n essential: true,\n functional: false,\n marketing: false,\n};\n\n/**\n * Full consent with custom category mapping applied\n * (essential->functional, functional->functional, marketing->marketing)\n */\nexport const fullConsentCustomMapped: WalkerOS.Consent = {\n functional: true,\n marketing: true,\n};\n\n/**\n * Service-level consent - individual service booleans + boolean ucCategory entries\n * (services normalized: lowercase, spaces to underscores)\n * (ucCategory boolean entries mapped through categoryMap)\n */\nexport const serviceLevelMapped: WalkerOS.Consent = {\n essential: true,\n google_analytics: true,\n google_ads_remarketing: false,\n hotjar: true,\n};\n","import type { Elb, Logger } from '@walkeros/core';\n\n/**\n * Example environment configurations for Usercentrics source testing.\n */\n\nconst noop = () => {};\n\n/**\n * Create a properly typed elb/push function mock\n */\nexport const createMockElbFn = (): Elb.Fn => {\n const fn = (() =>\n Promise.resolve({\n ok: true,\n })) as Elb.Fn;\n return fn;\n};\n\n/**\n * Simple no-op logger for demo purposes\n */\nexport const noopLogger: Logger.Instance = {\n error: noop,\n warn: noop,\n info: noop,\n debug: noop,\n throw: (message: string | Error) => {\n throw typeof message === 'string' ? new Error(message) : message;\n },\n json: noop,\n scope: () => noopLogger,\n};\n","import type { Flow } from '@walkeros/core';\n\nexport const fullConsent: Flow.StepExample = {\n trigger: { type: 'consent' },\n in: {\n event: 'consent_status',\n type: 'explicit',\n action: 'onAcceptAllServices',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n },\n out: [\n [\n 'elb',\n 'walker consent',\n {\n essential: true,\n functional: true,\n marketing: true,\n },\n ],\n ],\n};\n\nexport const minimalConsent: Flow.StepExample = {\n trigger: { type: 'consent' },\n in: {\n event: 'consent_status',\n type: 'explicit',\n action: 'onDenyAllServices',\n ucCategory: {\n essential: true,\n functional: false,\n marketing: false,\n },\n },\n out: [\n [\n 'elb',\n 'walker consent',\n {\n essential: true,\n functional: false,\n marketing: false,\n },\n ],\n ],\n};\n\nexport const categoryMapOverride: Flow.StepExample = {\n description:\n 'Custom categoryMap remaps essential to functional and functional to analytics',\n trigger: { type: 'consent' },\n in: {\n event: 'consent_status',\n type: 'explicit',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: false,\n },\n },\n mapping: {\n categoryMap: { essential: 'functional', functional: 'analytics' },\n },\n out: [\n [\n 'elb',\n 'walker consent',\n {\n functional: true,\n analytics: true,\n marketing: false,\n },\n ],\n ],\n};\n\nexport const customEventName: Flow.StepExample = {\n description: 'Using UC_SDK_EVENT instead of ucEvent for Usercentrics SDK v2',\n trigger: { type: 'consent', options: { eventName: 'UC_SDK_EVENT' } },\n in: {\n event: 'consent_status',\n type: 'explicit',\n ucCategory: {\n essential: true,\n functional: true,\n marketing: true,\n },\n },\n mapping: { eventName: 'UC_SDK_EVENT' },\n out: [\n [\n 'elb',\n 'walker consent',\n {\n essential: true,\n functional: true,\n marketing: true,\n },\n ],\n ],\n};\n","import type { Trigger, Collector } from '@walkeros/core';\nimport { startFlow } from '@walkeros/collector';\n\ninterface UsercentricsContent {\n event: string;\n type: string;\n action?: string;\n ucCategory?: Record<string, boolean | unknown>;\n [service: string]: unknown;\n}\n\nconst createTrigger: Trigger.CreateFn<UsercentricsContent, void> = async (\n config: Collector.InitConfig,\n) => {\n let flow: Trigger.FlowHandle | undefined;\n\n const trigger: Trigger.Fn<UsercentricsContent, void> =\n (type?: string, opts?: unknown) => async (content: UsercentricsContent) => {\n // Lazy startFlow — source registers ucEvent listener during init\n if (!flow) {\n const result = await startFlow({ ...config, run: config.run ?? true });\n flow = { collector: result.collector, elb: result.elb };\n }\n\n // Dispatch the CMP event — source's listener catches it\n const eventName =\n (opts as { eventName?: string })?.eventName || 'ucEvent';\n window.dispatchEvent(new CustomEvent(eventName, { detail: content }));\n };\n\n return {\n get flow() {\n return flow;\n },\n trigger,\n };\n};\n\n/** Dispatches ucEvent CustomEvent after source init (post-init trigger). */\nconst trigger = (\n input: unknown,\n env: Record<string, unknown>,\n): void | (() => void) => {\n if (!input || typeof input !== 'object') return;\n return () => {\n (env.window as Window).dispatchEvent(\n new CustomEvent('ucEvent', { detail: input }),\n );\n };\n};\n\nexport { createTrigger, trigger };\n","import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\n\n// Export Zod schemas and types\nexport { SettingsSchema, type Settings } from './settings';\n\n// JSON Schema exports (for website PropertyTable and documentation tools)\nexport const settings = zodToSchema(SettingsSchema);\n","import { z } from '@walkeros/core/dev';\n\n/**\n * Usercentrics source settings schema\n */\nexport const SettingsSchema = z\n .object({\n eventName: z\n .string()\n .describe(\n \"Window event name to listen for, configured in the Usercentrics admin (Implementation > Data Layer & Events). Use 'UC_SDK_EVENT' for the built-in Browser SDK event. Default: 'ucEvent'.\",\n )\n .optional(),\n\n categoryMap: z\n .record(z.string(), z.string())\n .describe(\n \"Map the CMP's consent categories (keys) to walkerOS consent groups (values).\",\n )\n .optional(),\n\n explicitOnly: z\n .boolean()\n .describe(\n \"Only process consent_status events where type is 'explicit'. Ignores implicit/default page-load events. Default: true.\",\n )\n .optional(),\n })\n .meta({\n id: 'UsercentricsSettings',\n title: 'Settings',\n description: 'Settings for the Usercentrics CMP source.',\n });\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACWO,IAAM,cAAuC;AAAA,EAClD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,EACb;AAAA,EACA,oBAAoB;AAAA,EACpB,0BAA0B;AAC5B;AAKO,IAAM,iBAA0C;AAAA,EACrD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,EACb;AAAA,EACA,oBAAoB;AAAA,EACpB,0BAA0B;AAC5B;AAKO,IAAM,iBAA0C;AAAA,EACrD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,EACb;AAAA,EACA,oBAAoB;AAAA,EACpB,0BAA0B;AAC5B;AAMO,IAAM,kBAA2C;AAAA,EACtD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,YAAY;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAA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;AAAA;AAAA;AAAA;AAAA,SAAS,mBAAmB;;;ACA5B,SAAS,SAAS;AAKX,IAAM,iBAAiB,EAC3B,OAAO;AAAA,EACN,WAAW,EACR,OAAO,EACP;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EAEZ,aAAa,EACV,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,EAC7B;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EAEZ,cAAc,EACX,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC,EACA,KAAK;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,aAAa;AACf,CAAC;;;ADzBI,IAAM,WAAW,YAAY,cAAc;","names":["fullConsent","minimalConsent","trigger"]}
@@ -185,11 +185,17 @@ var fullConsent2 = {
185
185
  marketing: true
186
186
  }
187
187
  },
188
- out: {
189
- essential: true,
190
- functional: true,
191
- marketing: true
192
- }
188
+ out: [
189
+ [
190
+ "elb",
191
+ "walker consent",
192
+ {
193
+ essential: true,
194
+ functional: true,
195
+ marketing: true
196
+ }
197
+ ]
198
+ ]
193
199
  };
194
200
  var minimalConsent2 = {
195
201
  trigger: { type: "consent" },
@@ -203,11 +209,17 @@ var minimalConsent2 = {
203
209
  marketing: false
204
210
  }
205
211
  },
206
- out: {
207
- essential: true,
208
- functional: false,
209
- marketing: false
210
- }
212
+ out: [
213
+ [
214
+ "elb",
215
+ "walker consent",
216
+ {
217
+ essential: true,
218
+ functional: false,
219
+ marketing: false
220
+ }
221
+ ]
222
+ ]
211
223
  };
212
224
  var categoryMapOverride = {
213
225
  description: "Custom categoryMap remaps essential to functional and functional to analytics",
@@ -224,11 +236,17 @@ var categoryMapOverride = {
224
236
  mapping: {
225
237
  categoryMap: { essential: "functional", functional: "analytics" }
226
238
  },
227
- out: {
228
- functional: true,
229
- analytics: true,
230
- marketing: false
231
- }
239
+ out: [
240
+ [
241
+ "elb",
242
+ "walker consent",
243
+ {
244
+ functional: true,
245
+ analytics: true,
246
+ marketing: false
247
+ }
248
+ ]
249
+ ]
232
250
  };
233
251
  var customEventName = {
234
252
  description: "Using UC_SDK_EVENT instead of ucEvent for Usercentrics SDK v2",
@@ -243,11 +261,17 @@ var customEventName = {
243
261
  }
244
262
  },
245
263
  mapping: { eventName: "UC_SDK_EVENT" },
246
- out: {
247
- essential: true,
248
- functional: true,
249
- marketing: true
250
- }
264
+ out: [
265
+ [
266
+ "elb",
267
+ "walker consent",
268
+ {
269
+ essential: true,
270
+ functional: true,
271
+ marketing: true
272
+ }
273
+ ]
274
+ ]
251
275
  };
252
276
 
253
277
  // src/examples/trigger.ts
@@ -149,11 +149,17 @@ var fullConsent2 = {
149
149
  marketing: true
150
150
  }
151
151
  },
152
- out: {
153
- essential: true,
154
- functional: true,
155
- marketing: true
156
- }
152
+ out: [
153
+ [
154
+ "elb",
155
+ "walker consent",
156
+ {
157
+ essential: true,
158
+ functional: true,
159
+ marketing: true
160
+ }
161
+ ]
162
+ ]
157
163
  };
158
164
  var minimalConsent2 = {
159
165
  trigger: { type: "consent" },
@@ -167,11 +173,17 @@ var minimalConsent2 = {
167
173
  marketing: false
168
174
  }
169
175
  },
170
- out: {
171
- essential: true,
172
- functional: false,
173
- marketing: false
174
- }
176
+ out: [
177
+ [
178
+ "elb",
179
+ "walker consent",
180
+ {
181
+ essential: true,
182
+ functional: false,
183
+ marketing: false
184
+ }
185
+ ]
186
+ ]
175
187
  };
176
188
  var categoryMapOverride = {
177
189
  description: "Custom categoryMap remaps essential to functional and functional to analytics",
@@ -188,11 +200,17 @@ var categoryMapOverride = {
188
200
  mapping: {
189
201
  categoryMap: { essential: "functional", functional: "analytics" }
190
202
  },
191
- out: {
192
- functional: true,
193
- analytics: true,
194
- marketing: false
195
- }
203
+ out: [
204
+ [
205
+ "elb",
206
+ "walker consent",
207
+ {
208
+ functional: true,
209
+ analytics: true,
210
+ marketing: false
211
+ }
212
+ ]
213
+ ]
196
214
  };
197
215
  var customEventName = {
198
216
  description: "Using UC_SDK_EVENT instead of ucEvent for Usercentrics SDK v2",
@@ -207,11 +225,17 @@ var customEventName = {
207
225
  }
208
226
  },
209
227
  mapping: { eventName: "UC_SDK_EVENT" },
210
- out: {
211
- essential: true,
212
- functional: true,
213
- marketing: true
214
- }
228
+ out: [
229
+ [
230
+ "elb",
231
+ "walker consent",
232
+ {
233
+ essential: true,
234
+ functional: true,
235
+ marketing: true
236
+ }
237
+ ]
238
+ ]
215
239
  };
216
240
 
217
241
  // src/examples/trigger.ts