@walkeros/web-destination-linkedin 4.8.1 → 4.8.3-next-1793115089237

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/CHANGELOG.md CHANGED
@@ -1,5 +1,73 @@
1
1
  # @walkeros/web-destination-linkedin
2
2
 
3
+ ## 4.8.3-next-1793115089237
4
+
5
+ ### Patch Changes
6
+
7
+ - 5313635: The sample events from `getEvent` now use the standard event names:
8
+ `checkout start` replaces `checkout view`, an order carries `tax` and `total`,
9
+ a promotion names its placement `slot`, and product events carry `currency`.
10
+ Order `value` is now the merchandise value: the `order complete` sample goes
11
+ from 555 to 462, and the gross amount charged is `total` (467.22). The
12
+ destination examples read `data.tax`, `data.slot` and the search keys
13
+ `data.term` and `data.results`, and gross fields such as Matomo `grandTotal`
14
+ read `data.total` first, then `data.value`. The CLI ships default event
15
+ contracts for common site types in `examples/contracts/`.
16
+ - 9316f2a: The `conversion` mapping description now says what happens when the
17
+ conversion resolves to no id: no `lintrk` call is made and the push fails with
18
+ `missing-input`. It no longer says such events are ignored, and it names the
19
+ server LinkedIn destination as the deduplication partner of `eventId`.
20
+ - 5313635: The package publishes a minimal example: the LinkedIn Partner ID,
21
+ with the Insight Tag script loaded by the destination. The docs page renders
22
+ the install line, the integrated code and the flow from it, and the package
23
+ test runs the same setup, so the setup a reader copies is the one that was
24
+ tested.
25
+ - Updated dependencies [29d2218]
26
+ - Updated dependencies [34fd225]
27
+ - Updated dependencies [5313635]
28
+ - Updated dependencies [5313635]
29
+ - Updated dependencies [5313635]
30
+ - Updated dependencies [5313635]
31
+ - Updated dependencies [5313635]
32
+ - Updated dependencies [34fd225]
33
+ - Updated dependencies [5313635]
34
+ - Updated dependencies [5313635]
35
+ - @walkeros/web-core@4.8.3-next-1793115089237
36
+ - @walkeros/core@4.8.3-next-1793115089237
37
+
38
+ ## 4.8.2
39
+
40
+ ### Patch Changes
41
+
42
+ - 2374f54: A failed vendor call, a missing required setting (`config`) and an
43
+ event that cannot be sent (`missing-input`) are reported as failed pushes,
44
+ with the dead-letter queue and one ERROR line, instead of counting as
45
+ delivered. Rules with `silent: true` send no event. Settings schemas reject
46
+ unknown keys.
47
+ - b1d65e2: Web destinations that load a vendor script inject it through the
48
+ document of their `env`, so simulation and server-side rendering work without
49
+ a browser page. A page still gets the script in its own document by default,
50
+ and a missing document fails the push with `vendor-not-ready`.
51
+ - 2374f54: Vendor scripts load through walkerOS: a blocked or slow script fails
52
+ later events visibly (`vendor-not-loaded`, `vendor-timeout`) instead of losing
53
+ them. Pushes made while the script loads wait for it, and each script is
54
+ injected once per page.
55
+ - Updated dependencies [2374f54]
56
+ - Updated dependencies [7e5fc27]
57
+ - Updated dependencies [2374f54]
58
+ - Updated dependencies [964590a]
59
+ - Updated dependencies [4100ede]
60
+ - Updated dependencies [2374f54]
61
+ - Updated dependencies [2374f54]
62
+ - Updated dependencies [15eb7b2]
63
+ - Updated dependencies [33a2779]
64
+ - Updated dependencies [33a2779]
65
+ - Updated dependencies [b1d65e2]
66
+ - Updated dependencies [964590a]
67
+ - Updated dependencies [2374f54]
68
+ - @walkeros/core@4.8.2
69
+ - @walkeros/web-core@4.8.2
70
+
3
71
  ## 4.8.1
4
72
 
5
73
  ### Patch Changes
package/README.md CHANGED
@@ -32,7 +32,10 @@ npm install @walkeros/web-destination-linkedin
32
32
  "destinations": {
33
33
  "linkedin": {
34
34
  "package": "@walkeros/web-destination-linkedin",
35
- "config": {}
35
+ "config": {
36
+ "loadScript": true,
37
+ "settings": { "apiKey": "123456" }
38
+ }
36
39
  }
37
40
  }
38
41
  }
@@ -40,6 +43,8 @@ npm install @walkeros/web-destination-linkedin
40
43
  }
41
44
  ```
42
45
 
46
+ LinkedIn tracks only the events whose rule sets a `conversion`, see the docs.
47
+
43
48
  ## Documentation
44
49
 
45
50
  Full configuration, mapping, and examples live in the docs:
package/dist/dev.d.mts CHANGED
@@ -5,7 +5,7 @@ import { Flow } from '@walkeros/core';
5
5
 
6
6
  declare const SettingsSchema: z.ZodObject<{
7
7
  apiKey: z.ZodString;
8
- }, z.core.$strip>;
8
+ }, z.core.$strict>;
9
9
  type Settings$1 = z.infer<typeof SettingsSchema>;
10
10
 
11
11
  /**
@@ -13,7 +13,7 @@ type Settings$1 = z.infer<typeof SettingsSchema>;
13
13
  *
14
14
  * Every field on `conversion` is a walkerOS mapping value (static literal,
15
15
  * string path, or `{ map, value, key, fn, ... }` object). The schema uses
16
- * `z.unknown()` for each so users can supply any valid mapping shape — the
16
+ * `z.unknown()` for each so users can supply any valid mapping shape; the
17
17
  * destination resolves it via `getMappingValue()` at push time.
18
18
  */
19
19
  declare const MappingSchema: z.ZodObject<{
@@ -36,7 +36,7 @@ declare namespace index$1 {
36
36
  /**
37
37
  * LinkedIn Insight Tag runtime surface.
38
38
  *
39
- * The Insight Tag script installs `window.lintrk` — a single function that
39
+ * The Insight Tag script installs `window.lintrk`, a single function that
40
40
  * accepts exactly one tracked action: `lintrk('track', data)`.
41
41
  *
42
42
  * Before the script loads, the destination installs a queue-backed shim so
@@ -64,24 +64,17 @@ declare global {
64
64
  /**
65
65
  * Destination-level settings.
66
66
  *
67
- * apiKey — the LinkedIn Partner ID (numeric string, e.g. "123456"), assigned
68
- * to `window._linkedin_partner_id` before the script loads.
69
- * include — event sections made available for mapping resolution. Present for
70
- * consistency with other destinations; has no effect at call time
71
- * because `lintrk()` only accepts four fixed fields. Kept so users
72
- * can reference section-prefixed keys in future custom mapping
73
- * strategies without a breaking change.
67
+ * apiKey: the LinkedIn Partner ID (numeric string, e.g. "123456"), assigned
68
+ * to `window._linkedin_partner_id` before the script loads.
74
69
  */
75
70
  interface Settings {
76
71
  apiKey: string;
77
72
  }
78
73
  /**
79
- * Env — mock surface for tests and dev. The destination mutates
74
+ * Env: mock surface for tests and dev. The destination mutates
80
75
  * `window._linkedin_partner_id` / `window._linkedin_data_partner_ids` and
81
76
  * installs `window.lintrk` in init; tests can pre-seed `window.lintrk` with
82
77
  * a spy to skip the script injection path.
83
- *
84
- * `document` is also mocked so `addScript()` can run headlessly.
85
78
  */
86
79
  interface Env extends DestinationWeb.Env {
87
80
  window: {
@@ -188,7 +181,7 @@ declare const demoRequestLead: LinkedInStepExample;
188
181
  */
189
182
  declare const conversionSilenced: LinkedInStepExample;
190
183
  /**
191
- * Falsy `id` → entire lintrk call is skipped.
184
+ * Falsy `id` → entire lintrk call is skipped and the push fails missing-input.
192
185
  *
193
186
  * If the resolved conversion object has no truthy `id`, the destination does
194
187
  * NOT call lintrk at all. This protects against misconfigured mappings
@@ -206,8 +199,15 @@ declare const missingConversionIdIgnored: LinkedInStepExample;
206
199
  * `event_id` appear in the final call - no `conversion_value`, no `currency`.
207
200
  */
208
201
  declare const partialFieldsOmitted: LinkedInStepExample;
202
+ /**
203
+ * A revocation of the consent the destination requires. The Insight Tag has
204
+ * no vendor consent mode, so the collector's consent gate is the only
205
+ * mechanism and no vendor call is made.
206
+ */
207
+ declare const consentRevoke: LinkedInStepExample;
209
208
 
210
209
  type step_LinkedInStepExample = LinkedInStepExample;
210
+ declare const step_consentRevoke: typeof consentRevoke;
211
211
  declare const step_conversionSilenced: typeof conversionSilenced;
212
212
  declare const step_demoRequestLead: typeof demoRequestLead;
213
213
  declare const step_missingConversionIdIgnored: typeof missingConversionIdIgnored;
@@ -217,13 +217,20 @@ declare const step_partialFieldsOmitted: typeof partialFieldsOmitted;
217
217
  declare const step_simpleConversionId: typeof simpleConversionId;
218
218
  declare const step_unmappedEventIgnored: typeof unmappedEventIgnored;
219
219
  declare namespace step {
220
- export { type step_LinkedInStepExample as LinkedInStepExample, step_conversionSilenced as conversionSilenced, step_demoRequestLead as demoRequestLead, step_missingConversionIdIgnored as missingConversionIdIgnored, step_orderCompleteFullConversion as orderCompleteFullConversion, step_pageViewConversion as pageViewConversion, step_partialFieldsOmitted as partialFieldsOmitted, step_simpleConversionId as simpleConversionId, step_unmappedEventIgnored as unmappedEventIgnored };
220
+ export { type step_LinkedInStepExample as LinkedInStepExample, step_consentRevoke as consentRevoke, step_conversionSilenced as conversionSilenced, step_demoRequestLead as demoRequestLead, step_missingConversionIdIgnored as missingConversionIdIgnored, step_orderCompleteFullConversion as orderCompleteFullConversion, step_pageViewConversion as pageViewConversion, step_partialFieldsOmitted as partialFieldsOmitted, step_simpleConversionId as simpleConversionId, step_unmappedEventIgnored as unmappedEventIgnored };
221
221
  }
222
222
 
223
+ /**
224
+ * The settings the Insight Tag needs to deliver: the Partner ID, with the
225
+ * Insight Tag script loaded by the destination.
226
+ */
227
+ declare const minimal: Flow.MinimalExample;
228
+
223
229
  declare const index_env: typeof env;
230
+ declare const index_minimal: typeof minimal;
224
231
  declare const index_step: typeof step;
225
232
  declare namespace index {
226
- export { index_env as env, index_step as step };
233
+ export { index_env as env, index_minimal as minimal, index_step as step };
227
234
  }
228
235
 
229
236
  export { index as examples, index$1 as schemas };
package/dist/dev.d.ts CHANGED
@@ -5,7 +5,7 @@ import { Flow } from '@walkeros/core';
5
5
 
6
6
  declare const SettingsSchema: z.ZodObject<{
7
7
  apiKey: z.ZodString;
8
- }, z.core.$strip>;
8
+ }, z.core.$strict>;
9
9
  type Settings$1 = z.infer<typeof SettingsSchema>;
10
10
 
11
11
  /**
@@ -13,7 +13,7 @@ type Settings$1 = z.infer<typeof SettingsSchema>;
13
13
  *
14
14
  * Every field on `conversion` is a walkerOS mapping value (static literal,
15
15
  * string path, or `{ map, value, key, fn, ... }` object). The schema uses
16
- * `z.unknown()` for each so users can supply any valid mapping shape — the
16
+ * `z.unknown()` for each so users can supply any valid mapping shape; the
17
17
  * destination resolves it via `getMappingValue()` at push time.
18
18
  */
19
19
  declare const MappingSchema: z.ZodObject<{
@@ -36,7 +36,7 @@ declare namespace index$1 {
36
36
  /**
37
37
  * LinkedIn Insight Tag runtime surface.
38
38
  *
39
- * The Insight Tag script installs `window.lintrk` — a single function that
39
+ * The Insight Tag script installs `window.lintrk`, a single function that
40
40
  * accepts exactly one tracked action: `lintrk('track', data)`.
41
41
  *
42
42
  * Before the script loads, the destination installs a queue-backed shim so
@@ -64,24 +64,17 @@ declare global {
64
64
  /**
65
65
  * Destination-level settings.
66
66
  *
67
- * apiKey — the LinkedIn Partner ID (numeric string, e.g. "123456"), assigned
68
- * to `window._linkedin_partner_id` before the script loads.
69
- * include — event sections made available for mapping resolution. Present for
70
- * consistency with other destinations; has no effect at call time
71
- * because `lintrk()` only accepts four fixed fields. Kept so users
72
- * can reference section-prefixed keys in future custom mapping
73
- * strategies without a breaking change.
67
+ * apiKey: the LinkedIn Partner ID (numeric string, e.g. "123456"), assigned
68
+ * to `window._linkedin_partner_id` before the script loads.
74
69
  */
75
70
  interface Settings {
76
71
  apiKey: string;
77
72
  }
78
73
  /**
79
- * Env — mock surface for tests and dev. The destination mutates
74
+ * Env: mock surface for tests and dev. The destination mutates
80
75
  * `window._linkedin_partner_id` / `window._linkedin_data_partner_ids` and
81
76
  * installs `window.lintrk` in init; tests can pre-seed `window.lintrk` with
82
77
  * a spy to skip the script injection path.
83
- *
84
- * `document` is also mocked so `addScript()` can run headlessly.
85
78
  */
86
79
  interface Env extends DestinationWeb.Env {
87
80
  window: {
@@ -188,7 +181,7 @@ declare const demoRequestLead: LinkedInStepExample;
188
181
  */
189
182
  declare const conversionSilenced: LinkedInStepExample;
190
183
  /**
191
- * Falsy `id` → entire lintrk call is skipped.
184
+ * Falsy `id` → entire lintrk call is skipped and the push fails missing-input.
192
185
  *
193
186
  * If the resolved conversion object has no truthy `id`, the destination does
194
187
  * NOT call lintrk at all. This protects against misconfigured mappings
@@ -206,8 +199,15 @@ declare const missingConversionIdIgnored: LinkedInStepExample;
206
199
  * `event_id` appear in the final call - no `conversion_value`, no `currency`.
207
200
  */
208
201
  declare const partialFieldsOmitted: LinkedInStepExample;
202
+ /**
203
+ * A revocation of the consent the destination requires. The Insight Tag has
204
+ * no vendor consent mode, so the collector's consent gate is the only
205
+ * mechanism and no vendor call is made.
206
+ */
207
+ declare const consentRevoke: LinkedInStepExample;
209
208
 
210
209
  type step_LinkedInStepExample = LinkedInStepExample;
210
+ declare const step_consentRevoke: typeof consentRevoke;
211
211
  declare const step_conversionSilenced: typeof conversionSilenced;
212
212
  declare const step_demoRequestLead: typeof demoRequestLead;
213
213
  declare const step_missingConversionIdIgnored: typeof missingConversionIdIgnored;
@@ -217,13 +217,20 @@ declare const step_partialFieldsOmitted: typeof partialFieldsOmitted;
217
217
  declare const step_simpleConversionId: typeof simpleConversionId;
218
218
  declare const step_unmappedEventIgnored: typeof unmappedEventIgnored;
219
219
  declare namespace step {
220
- export { type step_LinkedInStepExample as LinkedInStepExample, step_conversionSilenced as conversionSilenced, step_demoRequestLead as demoRequestLead, step_missingConversionIdIgnored as missingConversionIdIgnored, step_orderCompleteFullConversion as orderCompleteFullConversion, step_pageViewConversion as pageViewConversion, step_partialFieldsOmitted as partialFieldsOmitted, step_simpleConversionId as simpleConversionId, step_unmappedEventIgnored as unmappedEventIgnored };
220
+ export { type step_LinkedInStepExample as LinkedInStepExample, step_consentRevoke as consentRevoke, step_conversionSilenced as conversionSilenced, step_demoRequestLead as demoRequestLead, step_missingConversionIdIgnored as missingConversionIdIgnored, step_orderCompleteFullConversion as orderCompleteFullConversion, step_pageViewConversion as pageViewConversion, step_partialFieldsOmitted as partialFieldsOmitted, step_simpleConversionId as simpleConversionId, step_unmappedEventIgnored as unmappedEventIgnored };
221
221
  }
222
222
 
223
+ /**
224
+ * The settings the Insight Tag needs to deliver: the Partner ID, with the
225
+ * Insight Tag script loaded by the destination.
226
+ */
227
+ declare const minimal: Flow.MinimalExample;
228
+
223
229
  declare const index_env: typeof env;
230
+ declare const index_minimal: typeof minimal;
224
231
  declare const index_step: typeof step;
225
232
  declare namespace index {
226
- export { index_env as env, index_step as step };
233
+ export { index_env as env, index_minimal as minimal, index_step as step };
227
234
  }
228
235
 
229
236
  export { index as examples, index$1 as schemas };
package/dist/dev.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e,i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,o=(e,n)=>{for(var t in n)i(e,t,{get:n[t],enumerable:!0})},a={};o(a,{examples:()=>g,schemas:()=>d}),module.exports=(e=a,((e,o,a,d)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let s of t(o))r.call(e,s)||s===a||i(e,s,{get:()=>o[s],enumerable:!(d=n(o,s))||d.enumerable});return e})(i({},"__esModule",{value:!0}),e));var d={};o(d,{MappingSchema:()=>v,SettingsSchema:()=>l,mapping:()=>u,settings:()=>m});var s=require("@walkeros/core/dev"),c=require("@walkeros/core/dev"),l=c.z.object({apiKey:c.z.string().min(1).regex(/^\d+$/,'Must be a numeric LinkedIn Partner ID (digits only, e.g. "123456")').describe("Your LinkedIn Partner ID (numeric string, typically 6 to 7 digits). Find it in Campaign Manager under Insight Tag. Assigned to window._linkedin_partner_id before the Insight Tag script loads (like 1234567).")}),p=require("@walkeros/core/dev"),v=p.z.object({conversion:p.z.unknown().describe("Resolves to a LinkedIn conversion object with short keys: { id (required number — the Campaign Manager conversion_id), value? (number), currency? (ISO code), eventId? (string for deduplication with a future server/Conversions API destination) }. Events without a resolved id are silently ignored.").optional()}),m=(0,s.zodToSchema)(l),u=(0,s.zodToSchema)(v),g={};o(g,{env:()=>k,step:()=>w});var k={};o(k,{init:()=>b,push:()=>_,simulation:()=>f});var b={window:{_linkedin_partner_id:void 0,_linkedin_data_partner_ids:void 0,lintrk:void 0},document:{createElement:()=>({src:"",async:!1,dataset:{},setAttribute:()=>{},removeAttribute:()=>{}}),head:{appendChild:()=>{}},querySelector:()=>null}},_={window:{_linkedin_partner_id:"123456",_linkedin_data_partner_ids:["123456"],lintrk:Object.assign(()=>{},{q:[]})},document:{createElement:()=>({src:"",async:!1,dataset:{},setAttribute:()=>{},removeAttribute:()=>{}}),head:{appendChild:()=>{}},querySelector:()=>null}},f=["call:window.lintrk"],w={};o(w,{conversionSilenced:()=>C,demoRequestLead:()=>A,missingConversionIdIgnored:()=>O,orderCompleteFullConversion:()=>E,pageViewConversion:()=>q,partialFieldsOmitted:()=>S,simpleConversionId:()=>h,unmappedEventIgnored:()=>I});var y=require("@walkeros/core"),I={public:!1,in:(0,y.getEvent)("product view",{timestamp:1700000100}),out:[]},h={title:"Simple conversion",description:"A form submit fires a LinkedIn lintrk track with only a conversion_id from Campaign Manager.",in:(0,y.getEvent)("form submit",{timestamp:1700000101}),mapping:{settings:{conversion:{map:{id:{value:12345}}}}},out:[["lintrk","track",{conversion_id:12345}]]},E={title:"Ecommerce conversion",description:"A completed order fires a LinkedIn lintrk track with conversion_id, value, currency, and event_id for deduplication.",in:(0,y.getEvent)("order complete",{timestamp:1700000102,id:"1700000102abcdef"}),mapping:{settings:{conversion:{map:{id:{value:67890},value:"data.total",currency:{key:"data.currency",value:"EUR"},eventId:"id"}}}},out:[["lintrk","track",{conversion_id:67890,conversion_value:555,currency:"EUR",event_id:"1700000102abcdef"}]]},q={title:"Key page view",description:"A page view fires an explicit lintrk track mapped to a LinkedIn KEY_PAGE_VIEW conversion rule.",in:(0,y.getEvent)("page view",{timestamp:1700000103,id:"1700000103abcdef"}),mapping:{settings:{conversion:{map:{id:{value:11111},eventId:"id"}}}},out:[["lintrk","track",{conversion_id:11111,event_id:"1700000103abcdef"}]]},A={title:"Lead conversion",description:"A demo request fires a LinkedIn lintrk track for a lead conversion with id and event_id only.",in:(0,y.getEvent)("demo request",{timestamp:1700000104,id:"1700000104abcdef"}),mapping:{settings:{conversion:{map:{id:{value:44444},eventId:"id"}}}},out:[["lintrk","track",{conversion_id:44444,event_id:"1700000104abcdef"}]]},C={public:!1,in:(0,y.getEvent)("form submit",{timestamp:1700000105}),mapping:{silent:!0,settings:{conversion:{map:{id:{value:12345}}}}},out:[]},O={public:!1,in:(0,y.getEvent)("form submit",{timestamp:1700000106}),mapping:{settings:{conversion:{map:{id:"data.nonexistentField"}}}},out:[]},S={public:!1,in:(0,y.getEvent)("order complete",{timestamp:1700000107,id:"1700000107abcdef"}),mapping:{settings:{conversion:{map:{id:{value:67890},value:"data.missingTotal",eventId:"id"}}}},out:[["lintrk","track",{conversion_id:67890,event_id:"1700000107abcdef"}]]};//# sourceMappingURL=dev.js.map
1
+ "use strict";var e,i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,r=(e,n)=>{for(var t in n)i(e,t,{get:n[t],enumerable:!0})},a={};r(a,{examples:()=>g,schemas:()=>s}),module.exports=(e=a,((e,r,a,s)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let d of t(r))o.call(e,d)||d===a||i(e,d,{get:()=>r[d],enumerable:!(s=n(r,d))||s.enumerable});return e})(i({},"__esModule",{value:!0}),e));var s={};r(s,{MappingSchema:()=>m,SettingsSchema:()=>l,mapping:()=>u,settings:()=>v});var d=require("@walkeros/core/dev"),c=require("@walkeros/core/dev"),l=c.z.object({apiKey:c.z.string().min(1).regex(/^\d+$/,'Must be a numeric LinkedIn Partner ID (digits only, e.g. "123456")').describe("Your LinkedIn Partner ID (numeric string, typically 6 to 7 digits). Find it in Campaign Manager under Insight Tag. Assigned to window._linkedin_partner_id before the Insight Tag script loads (like 1234567).")}).strict(),p=require("@walkeros/core/dev"),m=p.z.object({conversion:p.z.unknown().describe("Resolves to a LinkedIn conversion object with short keys: { id (required number, the Campaign Manager conversion_id), value? (number), currency? (ISO code), eventId? (string, the same event id the server LinkedIn destination sends, for deduplication) }. A rule whose conversion resolves to no id makes no lintrk call and fails the push with missing-input.").optional()}),v=(0,d.zodToSchema)(l),u=(0,d.zodToSchema)(m),g={};r(g,{env:()=>k,minimal:()=>C,step:()=>h});var k={};r(k,{init:()=>_,push:()=>b,simulation:()=>f});var _={window:{_linkedin_partner_id:void 0,_linkedin_data_partner_ids:void 0,lintrk:void 0}},b={window:{_linkedin_partner_id:"123456",_linkedin_data_partner_ids:["123456"],lintrk:Object.assign(()=>{},{q:[]})}},f=["call:window.lintrk"],h={};r(h,{consentRevoke:()=>A,conversionSilenced:()=>j,demoRequestLead:()=>O,missingConversionIdIgnored:()=>q,orderCompleteFullConversion:()=>E,pageViewConversion:()=>L,partialFieldsOmitted:()=>S,simpleConversionId:()=>y,unmappedEventIgnored:()=>I});var w=require("@walkeros/core"),I={public:!1,in:(0,w.getEvent)("product view",{timestamp:1700000100}),out:[]},y={title:"Simple conversion",description:"A form submit fires a LinkedIn lintrk track with only a conversion_id from Campaign Manager.",in:(0,w.createEvent)({name:"form submit",timestamp:1700000101}),mapping:{settings:{conversion:{map:{id:{value:12345}}}}},out:[["lintrk","track",{conversion_id:12345}]]},E={title:"Ecommerce conversion",description:"A completed order fires a LinkedIn lintrk track with conversion_id, value, currency, and event_id for deduplication.",in:(0,w.getEvent)("order complete",{timestamp:1700000102,id:"1700000102abcdef"}),mapping:{settings:{conversion:{map:{id:{value:67890},value:"data.value",currency:{key:"data.currency",value:"EUR"},eventId:"id"}}}},out:[["lintrk","track",{conversion_id:67890,conversion_value:462,currency:"EUR",event_id:"1700000102abcdef"}]]},L={title:"Key page view",description:"A page view fires an explicit lintrk track mapped to a LinkedIn KEY_PAGE_VIEW conversion rule.",in:(0,w.getEvent)("page view",{timestamp:1700000103,id:"1700000103abcdef"}),mapping:{settings:{conversion:{map:{id:{value:11111},eventId:"id"}}}},out:[["lintrk","track",{conversion_id:11111,event_id:"1700000103abcdef"}]]},O={title:"Lead conversion",description:"A demo request fires a LinkedIn lintrk track for a lead conversion with id and event_id only.",in:(0,w.createEvent)({name:"demo request",timestamp:1700000104,id:"1700000104abcdef"}),mapping:{settings:{conversion:{map:{id:{value:44444},eventId:"id"}}}},out:[["lintrk","track",{conversion_id:44444,event_id:"1700000104abcdef"}]]},j={public:!1,in:(0,w.createEvent)({name:"form submit",timestamp:1700000105}),mapping:{silent:!0,settings:{conversion:{map:{id:{value:12345}}}}},out:[]},q={public:!1,description:"A conversion mapping whose id resolves to nothing makes no lintrk call, so the push fails with missing-input instead of counting as delivered.",in:(0,w.createEvent)({name:"form submit",timestamp:1700000106}),mapping:{settings:{conversion:{map:{id:"data.nonexistentField"}}}},out:[],outcome:{status:"failed",code:"missing-input"}},S={public:!1,in:(0,w.getEvent)("order complete",{timestamp:1700000107,id:"1700000107abcdef"}),mapping:{settings:{conversion:{map:{id:{value:67890},value:"data.missingTotal",eventId:"id"}}}},out:[["lintrk","track",{conversion_id:67890,event_id:"1700000107abcdef"}]]},A={public:!1,description:"For a destination with config.consent { marketing: true }, revoking marketing makes no vendor call: the Insight Tag has no consent mode, the collector stops sending.",command:"consent",in:{marketing:!1},out:[]},C={settings:{apiKey:"123456"},config:{loadScript:!0}};//# sourceMappingURL=dev.js.map
package/dist/dev.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dev.ts","../src/schemas/index.ts","../src/schemas/settings.ts","../src/schemas/mapping.ts","../src/examples/index.ts","../src/examples/env.ts","../src/examples/step.ts"],"sourcesContent":["export * as schemas from './schemas';\nexport * as examples from './examples';\n","import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\nimport { MappingSchema } from './mapping';\n\nexport { SettingsSchema, type Settings } from './settings';\nexport { MappingSchema, type Mapping } from './mapping';\n\n// JSON Schema\nexport const settings = zodToSchema(SettingsSchema);\nexport const mapping = zodToSchema(MappingSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z.object({\n apiKey: z\n .string()\n .min(1)\n .regex(\n /^\\d+$/,\n 'Must be a numeric LinkedIn Partner ID (digits only, e.g. \"123456\")',\n )\n .describe(\n 'Your LinkedIn Partner ID (numeric string, typically 6 to 7 digits). Find it in Campaign Manager under Insight Tag. Assigned to window._linkedin_partner_id before the Insight Tag script loads (like 1234567).',\n ),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\n/**\n * LinkedIn per-rule mapping schema.\n *\n * Every field on `conversion` is a walkerOS mapping value (static literal,\n * string path, or `{ map, value, key, fn, ... }` object). The schema uses\n * `z.unknown()` for each so users can supply any valid mapping shape — the\n * destination resolves it via `getMappingValue()` at push time.\n */\nexport const MappingSchema = z.object({\n conversion: z\n .unknown()\n .describe(\n 'Resolves to a LinkedIn conversion object with short keys: { id (required number — the Campaign Manager conversion_id), value? (number), currency? (ISO code), eventId? (string for deduplication with a future server/Conversions API destination) }. Events without a resolved id are silently ignored.',\n )\n .optional(),\n});\n\nexport type Mapping = z.infer<typeof MappingSchema>;\n","export * as env from './env';\nexport * as step from './step';\n","import type { Env, Lintrk } from '../types';\n\n/**\n * Example environment configurations for LinkedIn Insight Tag destination.\n *\n * Tests clone `push` and replace `window.lintrk` with a jest.fn() to collect\n * calls. Production leaves `env` undefined — the destination mutates the real\n * `window` object and injects the LinkedIn CDN script via `addScript()`.\n */\n\nconst noop = () => {};\n\n/**\n * Pre-init environment — no LinkedIn state present. The destination's init\n * will populate _linkedin_partner_id and install the lintrk queue.\n */\nexport const init: Env | undefined = {\n window: {\n _linkedin_partner_id: undefined,\n _linkedin_data_partner_ids: undefined,\n lintrk: undefined,\n },\n document: {\n createElement: () => ({\n src: '',\n async: false,\n dataset: {},\n setAttribute: () => {},\n removeAttribute: () => {},\n }),\n head: { appendChild: () => {} },\n querySelector: () => null,\n },\n};\n\n/**\n * Post-init environment — lintrk is a spy-able no-op function carrying the\n * queue shape the real script installs. Tests clone this and replace\n * `window.lintrk` with a jest.fn() before pushing events, so every call is\n * captured.\n */\nexport const push: Env = {\n window: {\n _linkedin_partner_id: '123456',\n _linkedin_data_partner_ids: ['123456'],\n lintrk: Object.assign(noop, { q: [] as unknown[] }) as unknown as Lintrk,\n },\n document: {\n createElement: () => ({\n src: '',\n async: false,\n dataset: {},\n setAttribute: () => {},\n removeAttribute: () => {},\n }),\n head: { appendChild: () => {} },\n querySelector: () => null,\n },\n};\n\n/**\n * Simulation tracking paths — used by CLI `--simulate` to record which\n * function calls happened during an event push.\n */\nexport const simulation = ['call:window.lintrk'];\n","import type { Flow } from '@walkeros/core';\nimport { getEvent } from '@walkeros/core';\nimport type { Settings } from '../types';\n\n/**\n * Examples may optionally override destination-level settings for a test.\n * The test runner reads `settings` from the example and merges it into the\n * base destination settings (on top of the fixed `apiKey`). Rarely needed\n * for LinkedIn - conversion config lives on the rule, not destination-level.\n */\nexport type LinkedInStepExample = Flow.StepExample & {\n settings?: Partial<Settings>;\n};\n\n/**\n * OPT-IN: Unmapped event is silently ignored.\n *\n * LinkedIn's core behavioral difference from analytics destinations: events\n * without `mapping.settings.conversion` produce ZERO lintrk() calls. The\n * destination is opt-in - each conversion must reference a pre-created\n * Conversion Rule from Campaign Manager.\n */\nexport const unmappedEventIgnored: LinkedInStepExample = {\n public: false,\n in: getEvent('product view', { timestamp: 1700000100 }),\n out: [],\n};\n\n/**\n * Simplest possible conversion - just a `conversion_id` from Campaign Manager.\n *\n * Form submission → LinkedIn Lead conversion. The mapping resolves `id` as a\n * literal value (no walker event field needed). The destination translates\n * `{ id }` → `lintrk('track', { conversion_id })`.\n */\nexport const simpleConversionId: LinkedInStepExample = {\n title: 'Simple conversion',\n description:\n 'A form submit fires a LinkedIn lintrk track with only a conversion_id from Campaign Manager.',\n in: getEvent('form submit', { timestamp: 1700000101 }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 12345 },\n },\n },\n },\n },\n out: [['lintrk', 'track', { conversion_id: 12345 }]],\n};\n\n/**\n * Full e-commerce conversion - every supported lintrk field populated.\n *\n * mapping config uses short walkerOS keys (`id`, `value`, `currency`, `eventId`);\n * the destination translates them to the vendor parameter names\n * (`conversion_id`, `conversion_value`, `currency`, `event_id`).\n *\n * Currency uses the walkerOS fallback syntax: `{ key, value }` - pull from\n * `data.currency` first, fall back to `\"EUR\"` if absent. The default\n * `order complete` fixture from `getEvent` already sets `data.currency: \"EUR\"`,\n * so the resolved value is \"EUR\" here.\n *\n * `eventId` maps from the walkerOS event.id - stable per event, unique, and\n * ready for deduplication with a future server (Conversions API) destination.\n */\nexport const orderCompleteFullConversion: LinkedInStepExample = {\n title: 'Ecommerce conversion',\n description:\n 'A completed order fires a LinkedIn lintrk track with conversion_id, value, currency, and event_id for deduplication.',\n in: getEvent('order complete', {\n timestamp: 1700000102,\n id: '1700000102abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 67890 },\n value: 'data.total',\n currency: { key: 'data.currency', value: 'EUR' },\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 67890,\n conversion_value: 555,\n currency: 'EUR',\n event_id: '1700000102abcdef',\n },\n ],\n ],\n};\n\n/**\n * Page view as an explicit conversion.\n *\n * LinkedIn's Insight Tag automatically fires a page view on load for\n * retargeting / audience building - that call is NOT something the\n * destination controls. This example tests the OTHER case: mapping a\n * specific walkerOS `page view` event to a Campaign Manager KEY_PAGE_VIEW\n * conversion rule, which fires an EXPLICIT lintrk('track') call in addition\n * to the auto page view.\n */\nexport const pageViewConversion: LinkedInStepExample = {\n title: 'Key page view',\n description:\n 'A page view fires an explicit lintrk track mapped to a LinkedIn KEY_PAGE_VIEW conversion rule.',\n in: getEvent('page view', {\n timestamp: 1700000103,\n id: '1700000103abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 11111 },\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 11111,\n event_id: '1700000103abcdef',\n },\n ],\n ],\n};\n\n/**\n * Middle-funnel LEAD conversion - demo request without monetary value.\n *\n * LinkedIn's conversion types include LEAD, CONTACT, SIGN_UP, etc. The\n * destination is agnostic to the type (set in Campaign Manager, not at call\n * time) - all we forward is the conversion_id. This fixture exercises the\n * \"id + eventId only\" shape.\n */\nexport const demoRequestLead: LinkedInStepExample = {\n title: 'Lead conversion',\n description:\n 'A demo request fires a LinkedIn lintrk track for a lead conversion with id and event_id only.',\n in: getEvent('demo request', {\n timestamp: 1700000104,\n id: '1700000104abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 44444 },\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 44444,\n event_id: '1700000104abcdef',\n },\n ],\n ],\n};\n\n/**\n * rule.silent - fully-configured conversion rule temporarily disabled.\n *\n * The rule has a valid `conversion.map` but `silent: true` tells the destination\n * to produce zero calls. This is distinct from the opt-in default (no\n * `conversion` at all): silent explicitly keeps the rule on disk for quick\n * reactivation without deleting it.\n */\nexport const conversionSilenced: LinkedInStepExample = {\n public: false,\n in: getEvent('form submit', { timestamp: 1700000105 }),\n mapping: {\n silent: true,\n settings: {\n conversion: {\n map: {\n id: { value: 12345 },\n },\n },\n },\n },\n out: [],\n};\n\n/**\n * Falsy `id` → entire lintrk call is skipped.\n *\n * If the resolved conversion object has no truthy `id`, the destination does\n * NOT call lintrk at all. This protects against misconfigured mappings\n * (e.g. pulling id from a non-existent field).\n *\n * Here we map `id` from `data.nonexistentField` - it resolves to undefined,\n * so zero calls are produced.\n */\nexport const missingConversionIdIgnored: LinkedInStepExample = {\n public: false,\n in: getEvent('form submit', { timestamp: 1700000106 }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: 'data.nonexistentField',\n },\n },\n },\n },\n out: [],\n};\n\n/**\n * Partial conversion - value missing → omitted from the lintrk call.\n *\n * The rule asks for `value: 'data.missingTotal'` (undefined), `currency`\n * (undefined), and `eventId: 'id'` (present). Only `conversion_id` and\n * `event_id` appear in the final call - no `conversion_value`, no `currency`.\n */\nexport const partialFieldsOmitted: LinkedInStepExample = {\n public: false,\n in: getEvent('order complete', {\n timestamp: 1700000107,\n id: '1700000107abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 67890 },\n value: 'data.missingTotal',\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 67890,\n event_id: '1700000107abcdef',\n },\n ],\n ],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACA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QAAI,sBAAS,eAAe,EAAE,WAAW,WAAW,CAAC;AAAA,EACrD,SAAS;AAAA,IACP,UAAU;AAAA,MACR,YAAY;AAAA,QACV,KAAK;AAAA,UACH,IAAI;AAAA,QACN;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,KAAK,CAAC;AACR;AASO,IAAM,uBAA4C;AAAA,EACvD,QAAQ;AAAA,EACR,QAAI,sBAAS,kBAAkB;AAAA,IAC7B,WAAW;AAAA,IACX,IAAI;AAAA,EACN,CAAC;AAAA,EACD,SAAS;AAAA,IACP,UAAU;AAAA,MACR,YAAY;AAAA,QACV,KAAK;AAAA,UACH,IAAI,EAAE,OAAO,MAAM;AAAA,UACnB,OAAO;AAAA,UACP,SAAS;AAAA,QACX;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,KAAK;AAAA,IACH;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,QACE,eAAe;AAAA,QACf,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AACF;","names":["import_dev","import_dev"]}
1
+ {"version":3,"sources":["../src/dev.ts","../src/schemas/index.ts","../src/schemas/settings.ts","../src/schemas/mapping.ts","../src/examples/index.ts","../src/examples/env.ts","../src/examples/step.ts","../src/examples/minimal.ts"],"sourcesContent":["export * as schemas from './schemas';\nexport * as examples from './examples';\n","import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\nimport { MappingSchema } from './mapping';\n\nexport { SettingsSchema, type Settings } from './settings';\nexport { MappingSchema, type Mapping } from './mapping';\n\n// JSON Schema\nexport const settings = zodToSchema(SettingsSchema);\nexport const mapping = zodToSchema(MappingSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z\n .object({\n apiKey: z\n .string()\n .min(1)\n .regex(\n /^\\d+$/,\n 'Must be a numeric LinkedIn Partner ID (digits only, e.g. \"123456\")',\n )\n .describe(\n 'Your LinkedIn Partner ID (numeric string, typically 6 to 7 digits). Find it in Campaign Manager under Insight Tag. Assigned to window._linkedin_partner_id before the Insight Tag script loads (like 1234567).',\n ),\n })\n .strict();\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\n/**\n * LinkedIn per-rule mapping schema.\n *\n * Every field on `conversion` is a walkerOS mapping value (static literal,\n * string path, or `{ map, value, key, fn, ... }` object). The schema uses\n * `z.unknown()` for each so users can supply any valid mapping shape; the\n * destination resolves it via `getMappingValue()` at push time.\n */\nexport const MappingSchema = z.object({\n conversion: z\n .unknown()\n .describe(\n 'Resolves to a LinkedIn conversion object with short keys: { id (required number, the Campaign Manager conversion_id), value? (number), currency? (ISO code), eventId? (string, the same event id the server LinkedIn destination sends, for deduplication) }. A rule whose conversion resolves to no id makes no lintrk call and fails the push with missing-input.',\n )\n .optional(),\n});\n\nexport type Mapping = z.infer<typeof MappingSchema>;\n","export * as env from './env';\nexport * as step from './step';\nexport { minimal } from './minimal';\n","import type { Env } from '../types';\n\n/**\n * Example environment configurations for LinkedIn Insight Tag destination.\n *\n * Tests clone `push` and replace `window.lintrk` with a jest.fn() to collect\n * calls. Production leaves `env` undefined — the destination mutates the real\n * `window` object and injects the LinkedIn CDN script through `loadVendor`.\n */\n\nconst noop = () => {};\n\n/**\n * Pre-init environment — no LinkedIn state present. The destination's init\n * will populate _linkedin_partner_id and install the lintrk queue.\n */\nexport const init: Env | undefined = {\n window: {\n _linkedin_partner_id: undefined,\n _linkedin_data_partner_ids: undefined,\n lintrk: undefined,\n },\n};\n\n/**\n * Post-init environment — lintrk is a spy-able no-op function carrying the\n * queue shape the real script installs. Tests clone this and replace\n * `window.lintrk` with a jest.fn() before pushing events, so every call is\n * captured.\n */\nexport const push: Env = {\n window: {\n _linkedin_partner_id: '123456',\n _linkedin_data_partner_ids: ['123456'],\n lintrk: Object.assign(noop, { q: [] }),\n },\n};\n\n/**\n * Simulation tracking paths — used by CLI `--simulate` to record which\n * function calls happened during an event push.\n */\nexport const simulation = ['call:window.lintrk'];\n","import type { Flow } from '@walkeros/core';\nimport { createEvent, getEvent } from '@walkeros/core';\nimport type { Settings } from '../types';\n\n/**\n * Examples may optionally override destination-level settings for a test.\n * The test runner reads `settings` from the example and merges it into the\n * base destination settings (on top of the fixed `apiKey`). Rarely needed\n * for LinkedIn - conversion config lives on the rule, not destination-level.\n */\nexport type LinkedInStepExample = Flow.StepExample & {\n settings?: Partial<Settings>;\n};\n\n/**\n * OPT-IN: Unmapped event is silently ignored.\n *\n * LinkedIn's core behavioral difference from analytics destinations: events\n * without `mapping.settings.conversion` produce ZERO lintrk() calls. The\n * destination is opt-in - each conversion must reference a pre-created\n * Conversion Rule from Campaign Manager.\n */\nexport const unmappedEventIgnored: LinkedInStepExample = {\n public: false,\n in: getEvent('product view', { timestamp: 1700000100 }),\n out: [],\n};\n\n/**\n * Simplest possible conversion - just a `conversion_id` from Campaign Manager.\n *\n * Form submission → LinkedIn Lead conversion. The mapping resolves `id` as a\n * literal value (no walker event field needed). The destination translates\n * `{ id }` → `lintrk('track', { conversion_id })`.\n */\nexport const simpleConversionId: LinkedInStepExample = {\n title: 'Simple conversion',\n description:\n 'A form submit fires a LinkedIn lintrk track with only a conversion_id from Campaign Manager.',\n in: createEvent({ name: 'form submit', timestamp: 1700000101 }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 12345 },\n },\n },\n },\n },\n out: [['lintrk', 'track', { conversion_id: 12345 }]],\n};\n\n/**\n * Full e-commerce conversion - every supported lintrk field populated.\n *\n * mapping config uses short walkerOS keys (`id`, `value`, `currency`, `eventId`);\n * the destination translates them to the vendor parameter names\n * (`conversion_id`, `conversion_value`, `currency`, `event_id`).\n *\n * Currency uses the walkerOS fallback syntax: `{ key, value }` - pull from\n * `data.currency` first, fall back to `\"EUR\"` if absent. The default\n * `order complete` fixture from `getEvent` already sets `data.currency: \"EUR\"`,\n * so the resolved value is \"EUR\" here.\n *\n * `eventId` maps from the walkerOS event.id - stable per event, unique, and\n * ready for deduplication with a future server (Conversions API) destination.\n */\nexport const orderCompleteFullConversion: LinkedInStepExample = {\n title: 'Ecommerce conversion',\n description:\n 'A completed order fires a LinkedIn lintrk track with conversion_id, value, currency, and event_id for deduplication.',\n in: getEvent('order complete', {\n timestamp: 1700000102,\n id: '1700000102abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 67890 },\n value: 'data.value',\n currency: { key: 'data.currency', value: 'EUR' },\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 67890,\n conversion_value: 462,\n currency: 'EUR',\n event_id: '1700000102abcdef',\n },\n ],\n ],\n};\n\n/**\n * Page view as an explicit conversion.\n *\n * LinkedIn's Insight Tag automatically fires a page view on load for\n * retargeting / audience building - that call is NOT something the\n * destination controls. This example tests the OTHER case: mapping a\n * specific walkerOS `page view` event to a Campaign Manager KEY_PAGE_VIEW\n * conversion rule, which fires an EXPLICIT lintrk('track') call in addition\n * to the auto page view.\n */\nexport const pageViewConversion: LinkedInStepExample = {\n title: 'Key page view',\n description:\n 'A page view fires an explicit lintrk track mapped to a LinkedIn KEY_PAGE_VIEW conversion rule.',\n in: getEvent('page view', {\n timestamp: 1700000103,\n id: '1700000103abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 11111 },\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 11111,\n event_id: '1700000103abcdef',\n },\n ],\n ],\n};\n\n/**\n * Middle-funnel LEAD conversion - demo request without monetary value.\n *\n * LinkedIn's conversion types include LEAD, CONTACT, SIGN_UP, etc. The\n * destination is agnostic to the type (set in Campaign Manager, not at call\n * time) - all we forward is the conversion_id. This fixture exercises the\n * \"id + eventId only\" shape.\n */\nexport const demoRequestLead: LinkedInStepExample = {\n title: 'Lead conversion',\n description:\n 'A demo request fires a LinkedIn lintrk track for a lead conversion with id and event_id only.',\n in: createEvent({\n name: 'demo request',\n timestamp: 1700000104,\n id: '1700000104abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 44444 },\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 44444,\n event_id: '1700000104abcdef',\n },\n ],\n ],\n};\n\n/**\n * rule.silent - fully-configured conversion rule temporarily disabled.\n *\n * The rule has a valid `conversion.map` but `silent: true` tells the destination\n * to produce zero calls. This is distinct from the opt-in default (no\n * `conversion` at all): silent explicitly keeps the rule on disk for quick\n * reactivation without deleting it.\n */\nexport const conversionSilenced: LinkedInStepExample = {\n public: false,\n in: createEvent({ name: 'form submit', timestamp: 1700000105 }),\n mapping: {\n silent: true,\n settings: {\n conversion: {\n map: {\n id: { value: 12345 },\n },\n },\n },\n },\n out: [],\n};\n\n/**\n * Falsy `id` → entire lintrk call is skipped and the push fails missing-input.\n *\n * If the resolved conversion object has no truthy `id`, the destination does\n * NOT call lintrk at all. This protects against misconfigured mappings\n * (e.g. pulling id from a non-existent field).\n *\n * Here we map `id` from `data.nonexistentField` - it resolves to undefined,\n * so zero calls are produced.\n */\nexport const missingConversionIdIgnored: LinkedInStepExample = {\n public: false,\n description:\n 'A conversion mapping whose id resolves to nothing makes no lintrk call, so the push fails with missing-input instead of counting as delivered.',\n in: createEvent({ name: 'form submit', timestamp: 1700000106 }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: 'data.nonexistentField',\n },\n },\n },\n },\n out: [],\n outcome: { status: 'failed', code: 'missing-input' },\n};\n\n/**\n * Partial conversion - value missing → omitted from the lintrk call.\n *\n * The rule asks for `value: 'data.missingTotal'` (undefined), `currency`\n * (undefined), and `eventId: 'id'` (present). Only `conversion_id` and\n * `event_id` appear in the final call - no `conversion_value`, no `currency`.\n */\nexport const partialFieldsOmitted: LinkedInStepExample = {\n public: false,\n in: getEvent('order complete', {\n timestamp: 1700000107,\n id: '1700000107abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 67890 },\n value: 'data.missingTotal',\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 67890,\n event_id: '1700000107abcdef',\n },\n ],\n ],\n};\n\n/**\n * A revocation of the consent the destination requires. The Insight Tag has\n * no vendor consent mode, so the collector's consent gate is the only\n * mechanism and no vendor call is made.\n */\nexport const consentRevoke: LinkedInStepExample = {\n public: false,\n description:\n 'For a destination with config.consent { marketing: true }, revoking marketing makes no vendor call: the Insight Tag has no consent mode, the collector stops sending.',\n command: 'consent',\n in: { marketing: false },\n out: [],\n};\n","import type { Flow } from '@walkeros/core';\n\n/**\n * The settings the Insight Tag needs to deliver: the Partner ID, with the\n * Insight Tag script loaded by the destination.\n */\nexport const minimal: Flow.MinimalExample = {\n settings: { apiKey: '123456' },\n config: { loadScript: true },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,cAA4B;;;ACA5B,iBAAkB;AAEX,IAAM,iBAAiB,aAC3B,OAAO;AAAA,EACN,QAAQ,aACL,OAAO,EACP,IAAI,CAAC,EACL;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,EACF;AACJ,CAAC,EACA,OAAO;;;ACfV,IAAAC,cAAkB;AAUX,IAAM,gBAAgB,cAAE,OAAO;AAAA,EACpC,YAAY,cACT,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;;;AFTM,IAAM,eAAW,yBAAY,cAAc;AAC3C,IAAM,cAAU,yBAAY,aAAa;;;AGThD;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,IAAM,OAAO,MAAM;AAAC;AAMb,IAAM,OAAwB;AAAA,EACnC,QAAQ;AAAA,IACN,sBAAsB;AAAA,IACtB,4BAA4B;AAAA,IAC5B,QAAQ;AAAA,E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ACA,KAAK,CAAC;AACR;AAYO,IAAM,6BAAkD;AAAA,EAC7D,QAAQ;AAAA,EACR,aACE;AAAA,EACF,QAAI,yBAAY,EAAE,MAAM,eAAe,WAAW,WAAW,CAAC;AAAA,EAC9D,SAAS;AAAA,IACP,UAAU;AAAA,MACR,YAAY;AAAA,QACV,KAAK;AAAA,UACH,IAAI;AAAA,QACN;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,KAAK,CAAC;AAAA,EACN,SAAS,EAAE,QAAQ,UAAU,MAAM,gBAAgB;AACrD;AASO,IAAM,uBAA4C;AAAA,EACvD,QAAQ;AAAA,EACR,QAAI,sBAAS,kBAAkB;AAAA,IAC7B,WAAW;AAAA,IACX,IAAI;AAAA,EACN,CAAC;AAAA,EACD,SAAS;AAAA,IACP,UAAU;AAAA,MACR,YAAY;AAAA,QACV,KAAK;AAAA,UACH,IAAI,EAAE,OAAO,MAAM;AAAA,UACnB,OAAO;AAAA,UACP,SAAS;AAAA,QACX;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,KAAK;AAAA,IACH;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,QACE,eAAe;AAAA,QACf,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AACF;AAOO,IAAM,gBAAqC;AAAA,EAChD,QAAQ;AAAA,EACR,aACE;AAAA,EACF,SAAS;AAAA,EACT,IAAI,EAAE,WAAW,MAAM;AAAA,EACvB,KAAK,CAAC;AACR;;;AClRO,IAAM,UAA+B;AAAA,EAC1C,UAAU,EAAE,QAAQ,SAAS;AAAA,EAC7B,QAAQ,EAAE,YAAY,KAAK;AAC7B;","names":["import_dev","import_dev"]}
package/dist/dev.mjs CHANGED
@@ -1 +1 @@
1
- var e=Object.defineProperty,i=(i,n)=>{for(var t in n)e(i,t,{get:n[t],enumerable:!0})},n={};i(n,{MappingSchema:()=>d,SettingsSchema:()=>a,mapping:()=>c,settings:()=>s});import{zodToSchema as t}from"@walkeros/core/dev";import{z as r}from"@walkeros/core/dev";var a=r.object({apiKey:r.string().min(1).regex(/^\d+$/,'Must be a numeric LinkedIn Partner ID (digits only, e.g. "123456")').describe("Your LinkedIn Partner ID (numeric string, typically 6 to 7 digits). Find it in Campaign Manager under Insight Tag. Assigned to window._linkedin_partner_id before the Insight Tag script loads (like 1234567).")});import{z as o}from"@walkeros/core/dev";var d=o.object({conversion:o.unknown().describe("Resolves to a LinkedIn conversion object with short keys: { id (required number — the Campaign Manager conversion_id), value? (number), currency? (ISO code), eventId? (string for deduplication with a future server/Conversions API destination) }. Events without a resolved id are silently ignored.").optional()}),s=t(a),c=t(d),l={};i(l,{env:()=>p,step:()=>g});var p={};i(p,{init:()=>m,push:()=>v,simulation:()=>u});var m={window:{_linkedin_partner_id:void 0,_linkedin_data_partner_ids:void 0,lintrk:void 0},document:{createElement:()=>({src:"",async:!1,dataset:{},setAttribute:()=>{},removeAttribute:()=>{}}),head:{appendChild:()=>{}},querySelector:()=>null}},v={window:{_linkedin_partner_id:"123456",_linkedin_data_partner_ids:["123456"],lintrk:Object.assign(()=>{},{q:[]})},document:{createElement:()=>({src:"",async:!1,dataset:{},setAttribute:()=>{},removeAttribute:()=>{}}),head:{appendChild:()=>{}},querySelector:()=>null}},u=["call:window.lintrk"],g={};i(g,{conversionSilenced:()=>y,demoRequestLead:()=>I,missingConversionIdIgnored:()=>h,orderCompleteFullConversion:()=>f,pageViewConversion:()=>w,partialFieldsOmitted:()=>A,simpleConversionId:()=>b,unmappedEventIgnored:()=>_});import{getEvent as k}from"@walkeros/core";var _={public:!1,in:k("product view",{timestamp:1700000100}),out:[]},b={title:"Simple conversion",description:"A form submit fires a LinkedIn lintrk track with only a conversion_id from Campaign Manager.",in:k("form submit",{timestamp:1700000101}),mapping:{settings:{conversion:{map:{id:{value:12345}}}}},out:[["lintrk","track",{conversion_id:12345}]]},f={title:"Ecommerce conversion",description:"A completed order fires a LinkedIn lintrk track with conversion_id, value, currency, and event_id for deduplication.",in:k("order complete",{timestamp:1700000102,id:"1700000102abcdef"}),mapping:{settings:{conversion:{map:{id:{value:67890},value:"data.total",currency:{key:"data.currency",value:"EUR"},eventId:"id"}}}},out:[["lintrk","track",{conversion_id:67890,conversion_value:555,currency:"EUR",event_id:"1700000102abcdef"}]]},w={title:"Key page view",description:"A page view fires an explicit lintrk track mapped to a LinkedIn KEY_PAGE_VIEW conversion rule.",in:k("page view",{timestamp:1700000103,id:"1700000103abcdef"}),mapping:{settings:{conversion:{map:{id:{value:11111},eventId:"id"}}}},out:[["lintrk","track",{conversion_id:11111,event_id:"1700000103abcdef"}]]},I={title:"Lead conversion",description:"A demo request fires a LinkedIn lintrk track for a lead conversion with id and event_id only.",in:k("demo request",{timestamp:1700000104,id:"1700000104abcdef"}),mapping:{settings:{conversion:{map:{id:{value:44444},eventId:"id"}}}},out:[["lintrk","track",{conversion_id:44444,event_id:"1700000104abcdef"}]]},y={public:!1,in:k("form submit",{timestamp:1700000105}),mapping:{silent:!0,settings:{conversion:{map:{id:{value:12345}}}}},out:[]},h={public:!1,in:k("form submit",{timestamp:1700000106}),mapping:{settings:{conversion:{map:{id:"data.nonexistentField"}}}},out:[]},A={public:!1,in:k("order complete",{timestamp:1700000107,id:"1700000107abcdef"}),mapping:{settings:{conversion:{map:{id:{value:67890},value:"data.missingTotal",eventId:"id"}}}},out:[["lintrk","track",{conversion_id:67890,event_id:"1700000107abcdef"}]]};export{l as examples,n as schemas};//# sourceMappingURL=dev.mjs.map
1
+ var e=Object.defineProperty,i=(i,n)=>{for(var t in n)e(i,t,{get:n[t],enumerable:!0})},n={};i(n,{MappingSchema:()=>s,SettingsSchema:()=>r,mapping:()=>c,settings:()=>d});import{zodToSchema as t}from"@walkeros/core/dev";import{z as o}from"@walkeros/core/dev";var r=o.object({apiKey:o.string().min(1).regex(/^\d+$/,'Must be a numeric LinkedIn Partner ID (digits only, e.g. "123456")').describe("Your LinkedIn Partner ID (numeric string, typically 6 to 7 digits). Find it in Campaign Manager under Insight Tag. Assigned to window._linkedin_partner_id before the Insight Tag script loads (like 1234567).")}).strict();import{z as a}from"@walkeros/core/dev";var s=a.object({conversion:a.unknown().describe("Resolves to a LinkedIn conversion object with short keys: { id (required number, the Campaign Manager conversion_id), value? (number), currency? (ISO code), eventId? (string, the same event id the server LinkedIn destination sends, for deduplication) }. A rule whose conversion resolves to no id makes no lintrk call and fails the push with missing-input.").optional()}),d=t(r),c=t(s),m={};i(m,{env:()=>l,minimal:()=>E,step:()=>g});var l={};i(l,{init:()=>p,push:()=>v,simulation:()=>u});var p={window:{_linkedin_partner_id:void 0,_linkedin_data_partner_ids:void 0,lintrk:void 0}},v={window:{_linkedin_partner_id:"123456",_linkedin_data_partner_ids:["123456"],lintrk:Object.assign(()=>{},{q:[]})}},u=["call:window.lintrk"],g={};i(g,{consentRevoke:()=>C,conversionSilenced:()=>y,demoRequestLead:()=>I,missingConversionIdIgnored:()=>L,orderCompleteFullConversion:()=>h,pageViewConversion:()=>w,partialFieldsOmitted:()=>A,simpleConversionId:()=>b,unmappedEventIgnored:()=>f});import{createEvent as k,getEvent as _}from"@walkeros/core";var f={public:!1,in:_("product view",{timestamp:1700000100}),out:[]},b={title:"Simple conversion",description:"A form submit fires a LinkedIn lintrk track with only a conversion_id from Campaign Manager.",in:k({name:"form submit",timestamp:1700000101}),mapping:{settings:{conversion:{map:{id:{value:12345}}}}},out:[["lintrk","track",{conversion_id:12345}]]},h={title:"Ecommerce conversion",description:"A completed order fires a LinkedIn lintrk track with conversion_id, value, currency, and event_id for deduplication.",in:_("order complete",{timestamp:1700000102,id:"1700000102abcdef"}),mapping:{settings:{conversion:{map:{id:{value:67890},value:"data.value",currency:{key:"data.currency",value:"EUR"},eventId:"id"}}}},out:[["lintrk","track",{conversion_id:67890,conversion_value:462,currency:"EUR",event_id:"1700000102abcdef"}]]},w={title:"Key page view",description:"A page view fires an explicit lintrk track mapped to a LinkedIn KEY_PAGE_VIEW conversion rule.",in:_("page view",{timestamp:1700000103,id:"1700000103abcdef"}),mapping:{settings:{conversion:{map:{id:{value:11111},eventId:"id"}}}},out:[["lintrk","track",{conversion_id:11111,event_id:"1700000103abcdef"}]]},I={title:"Lead conversion",description:"A demo request fires a LinkedIn lintrk track for a lead conversion with id and event_id only.",in:k({name:"demo request",timestamp:1700000104,id:"1700000104abcdef"}),mapping:{settings:{conversion:{map:{id:{value:44444},eventId:"id"}}}},out:[["lintrk","track",{conversion_id:44444,event_id:"1700000104abcdef"}]]},y={public:!1,in:k({name:"form submit",timestamp:1700000105}),mapping:{silent:!0,settings:{conversion:{map:{id:{value:12345}}}}},out:[]},L={public:!1,description:"A conversion mapping whose id resolves to nothing makes no lintrk call, so the push fails with missing-input instead of counting as delivered.",in:k({name:"form submit",timestamp:1700000106}),mapping:{settings:{conversion:{map:{id:"data.nonexistentField"}}}},out:[],outcome:{status:"failed",code:"missing-input"}},A={public:!1,in:_("order complete",{timestamp:1700000107,id:"1700000107abcdef"}),mapping:{settings:{conversion:{map:{id:{value:67890},value:"data.missingTotal",eventId:"id"}}}},out:[["lintrk","track",{conversion_id:67890,event_id:"1700000107abcdef"}]]},C={public:!1,description:"For a destination with config.consent { marketing: true }, revoking marketing makes no vendor call: the Insight Tag has no consent mode, the collector stops sending.",command:"consent",in:{marketing:!1},out:[]},E={settings:{apiKey:"123456"},config:{loadScript:!0}};export{m as examples,n as schemas};//# sourceMappingURL=dev.mjs.map
package/dist/dev.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/schemas/index.ts","../src/schemas/settings.ts","../src/schemas/mapping.ts","../src/examples/index.ts","../src/examples/env.ts","../src/examples/step.ts"],"sourcesContent":["import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\nimport { MappingSchema } from './mapping';\n\nexport { SettingsSchema, type Settings } from './settings';\nexport { MappingSchema, type Mapping } from './mapping';\n\n// JSON Schema\nexport const settings = zodToSchema(SettingsSchema);\nexport const mapping = zodToSchema(MappingSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z.object({\n apiKey: z\n .string()\n .min(1)\n .regex(\n /^\\d+$/,\n 'Must be a numeric LinkedIn Partner ID (digits only, e.g. \"123456\")',\n )\n .describe(\n 'Your LinkedIn Partner ID (numeric string, typically 6 to 7 digits). Find it in Campaign Manager under Insight Tag. Assigned to window._linkedin_partner_id before the Insight Tag script loads (like 1234567).',\n ),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\n/**\n * LinkedIn per-rule mapping schema.\n *\n * Every field on `conversion` is a walkerOS mapping value (static literal,\n * string path, or `{ map, value, key, fn, ... }` object). The schema uses\n * `z.unknown()` for each so users can supply any valid mapping shape — the\n * destination resolves it via `getMappingValue()` at push time.\n */\nexport const MappingSchema = z.object({\n conversion: z\n .unknown()\n .describe(\n 'Resolves to a LinkedIn conversion object with short keys: { id (required number — the Campaign Manager conversion_id), value? (number), currency? (ISO code), eventId? (string for deduplication with a future server/Conversions API destination) }. Events without a resolved id are silently ignored.',\n )\n .optional(),\n});\n\nexport type Mapping = z.infer<typeof MappingSchema>;\n","export * as env from './env';\nexport * as step from './step';\n","import type { Env, Lintrk } from '../types';\n\n/**\n * Example environment configurations for LinkedIn Insight Tag destination.\n *\n * Tests clone `push` and replace `window.lintrk` with a jest.fn() to collect\n * calls. Production leaves `env` undefined — the destination mutates the real\n * `window` object and injects the LinkedIn CDN script via `addScript()`.\n */\n\nconst noop = () => {};\n\n/**\n * Pre-init environment — no LinkedIn state present. The destination's init\n * will populate _linkedin_partner_id and install the lintrk queue.\n */\nexport const init: Env | undefined = {\n window: {\n _linkedin_partner_id: undefined,\n _linkedin_data_partner_ids: undefined,\n lintrk: undefined,\n },\n document: {\n createElement: () => ({\n src: '',\n async: false,\n dataset: {},\n setAttribute: () => {},\n removeAttribute: () => {},\n }),\n head: { appendChild: () => {} },\n querySelector: () => null,\n },\n};\n\n/**\n * Post-init environment — lintrk is a spy-able no-op function carrying the\n * queue shape the real script installs. Tests clone this and replace\n * `window.lintrk` with a jest.fn() before pushing events, so every call is\n * captured.\n */\nexport const push: Env = {\n window: {\n _linkedin_partner_id: '123456',\n _linkedin_data_partner_ids: ['123456'],\n lintrk: Object.assign(noop, { q: [] as unknown[] }) as unknown as Lintrk,\n },\n document: {\n createElement: () => ({\n src: '',\n async: false,\n dataset: {},\n setAttribute: () => {},\n removeAttribute: () => {},\n }),\n head: { appendChild: () => {} },\n querySelector: () => null,\n },\n};\n\n/**\n * Simulation tracking paths — used by CLI `--simulate` to record which\n * function calls happened during an event push.\n */\nexport const simulation = ['call:window.lintrk'];\n","import type { Flow } from '@walkeros/core';\nimport { getEvent } from '@walkeros/core';\nimport type { Settings } from '../types';\n\n/**\n * Examples may optionally override destination-level settings for a test.\n * The test runner reads `settings` from the example and merges it into the\n * base destination settings (on top of the fixed `apiKey`). Rarely needed\n * for LinkedIn - conversion config lives on the rule, not destination-level.\n */\nexport type LinkedInStepExample = Flow.StepExample & {\n settings?: Partial<Settings>;\n};\n\n/**\n * OPT-IN: Unmapped event is silently ignored.\n *\n * LinkedIn's core behavioral difference from analytics destinations: events\n * without `mapping.settings.conversion` produce ZERO lintrk() calls. The\n * destination is opt-in - each conversion must reference a pre-created\n * Conversion Rule from Campaign Manager.\n */\nexport const unmappedEventIgnored: LinkedInStepExample = {\n public: false,\n in: getEvent('product view', { timestamp: 1700000100 }),\n out: [],\n};\n\n/**\n * Simplest possible conversion - just a `conversion_id` from Campaign Manager.\n *\n * Form submission → LinkedIn Lead conversion. The mapping resolves `id` as a\n * literal value (no walker event field needed). The destination translates\n * `{ id }` → `lintrk('track', { conversion_id })`.\n */\nexport const simpleConversionId: LinkedInStepExample = {\n title: 'Simple conversion',\n description:\n 'A form submit fires a LinkedIn lintrk track with only a conversion_id from Campaign Manager.',\n in: getEvent('form submit', { timestamp: 1700000101 }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 12345 },\n },\n },\n },\n },\n out: [['lintrk', 'track', { conversion_id: 12345 }]],\n};\n\n/**\n * Full e-commerce conversion - every supported lintrk field populated.\n *\n * mapping config uses short walkerOS keys (`id`, `value`, `currency`, `eventId`);\n * the destination translates them to the vendor parameter names\n * (`conversion_id`, `conversion_value`, `currency`, `event_id`).\n *\n * Currency uses the walkerOS fallback syntax: `{ key, value }` - pull from\n * `data.currency` first, fall back to `\"EUR\"` if absent. The default\n * `order complete` fixture from `getEvent` already sets `data.currency: \"EUR\"`,\n * so the resolved value is \"EUR\" here.\n *\n * `eventId` maps from the walkerOS event.id - stable per event, unique, and\n * ready for deduplication with a future server (Conversions API) destination.\n */\nexport const orderCompleteFullConversion: LinkedInStepExample = {\n title: 'Ecommerce conversion',\n description:\n 'A completed order fires a LinkedIn lintrk track with conversion_id, value, currency, and event_id for deduplication.',\n in: getEvent('order complete', {\n timestamp: 1700000102,\n id: '1700000102abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 67890 },\n value: 'data.total',\n currency: { key: 'data.currency', value: 'EUR' },\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 67890,\n conversion_value: 555,\n currency: 'EUR',\n event_id: '1700000102abcdef',\n },\n ],\n ],\n};\n\n/**\n * Page view as an explicit conversion.\n *\n * LinkedIn's Insight Tag automatically fires a page view on load for\n * retargeting / audience building - that call is NOT something the\n * destination controls. This example tests the OTHER case: mapping a\n * specific walkerOS `page view` event to a Campaign Manager KEY_PAGE_VIEW\n * conversion rule, which fires an EXPLICIT lintrk('track') call in addition\n * to the auto page view.\n */\nexport const pageViewConversion: LinkedInStepExample = {\n title: 'Key page view',\n description:\n 'A page view fires an explicit lintrk track mapped to a LinkedIn KEY_PAGE_VIEW conversion rule.',\n in: getEvent('page view', {\n timestamp: 1700000103,\n id: '1700000103abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 11111 },\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 11111,\n event_id: '1700000103abcdef',\n },\n ],\n ],\n};\n\n/**\n * Middle-funnel LEAD conversion - demo request without monetary value.\n *\n * LinkedIn's conversion types include LEAD, CONTACT, SIGN_UP, etc. The\n * destination is agnostic to the type (set in Campaign Manager, not at call\n * time) - all we forward is the conversion_id. This fixture exercises the\n * \"id + eventId only\" shape.\n */\nexport const demoRequestLead: LinkedInStepExample = {\n title: 'Lead conversion',\n description:\n 'A demo request fires a LinkedIn lintrk track for a lead conversion with id and event_id only.',\n in: getEvent('demo request', {\n timestamp: 1700000104,\n id: '1700000104abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 44444 },\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 44444,\n event_id: '1700000104abcdef',\n },\n ],\n ],\n};\n\n/**\n * rule.silent - fully-configured conversion rule temporarily disabled.\n *\n * The rule has a valid `conversion.map` but `silent: true` tells the destination\n * to produce zero calls. This is distinct from the opt-in default (no\n * `conversion` at all): silent explicitly keeps the rule on disk for quick\n * reactivation without deleting it.\n */\nexport const conversionSilenced: LinkedInStepExample = {\n public: false,\n in: getEvent('form submit', { timestamp: 1700000105 }),\n mapping: {\n silent: true,\n settings: {\n conversion: {\n map: {\n id: { value: 12345 },\n },\n },\n },\n },\n out: [],\n};\n\n/**\n * Falsy `id` → entire lintrk call is skipped.\n *\n * If the resolved conversion object has no truthy `id`, the destination does\n * NOT call lintrk at all. This protects against misconfigured mappings\n * (e.g. pulling id from a non-existent field).\n *\n * Here we map `id` from `data.nonexistentField` - it resolves to undefined,\n * so zero calls are produced.\n */\nexport const missingConversionIdIgnored: LinkedInStepExample = {\n public: false,\n in: getEvent('form submit', { timestamp: 1700000106 }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: 'data.nonexistentField',\n },\n },\n },\n },\n out: [],\n};\n\n/**\n * Partial conversion - value missing → omitted from the lintrk call.\n *\n * The rule asks for `value: 'data.missingTotal'` (undefined), `currency`\n * (undefined), and `eventId: 'id'` (present). Only `conversion_id` and\n * `event_id` appear in the final call - no `conversion_value`, no `currency`.\n */\nexport const partialFieldsOmitted: LinkedInStepExample = {\n public: false,\n in: getEvent('order complete', {\n timestamp: 1700000107,\n id: '1700000107abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 67890 },\n value: 'data.missingTotal',\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 67890,\n event_id: '1700000107abcdef',\n },\n ],\n ],\n};\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAS,mBAAmB;;;ACA5B,SAAS,SAAS;AAEX,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACrC,QAAQ,EACL,OAAO,EACP,IAAI,CAAC,EACL;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,EACF;AACJ,CAAC;;;ACbD,SAAS,KAAAA,UAAS;AAUX,IAAM,gBAAgBA,GAAE,OAAO;AAAA,EACpC,YAAYA,GACT,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;;;AFTM,IAAM,WAAW,YAAY,cAAc;AAC3C,IAAM,UAAU,YAAY,aAAa;;;AGThD;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,IAAM,OAAO,MAAM;AAAC;AAMb,IAAM,OAAwB;AAAA,EACnC,QAAQ;AAAA,IACN,sBAAsB;AAAA,IACtB,4BAA4B;AAAA,IAC5B,QAAQ;AAAA,EACV;AAAA,EACA,UAAU;AAAA,IACR,eAAe,OAAO;AAAA,MACpB,KAAK;AAAA,MACL,OAAO;AAAA,MACP,SAAS,CAAC;AAAA,MACV,cAAc,MAAM;AAAA,MAAC;AAAA,MACrB,iBAAiB,MAAM;AAAA,MAAC;AAAA,IAC1B;AAAA,IACA,MAAM,EAAE,aA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U;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AACF;AAUO,IAAM,qBAA0C;AAAA,EACrD,QAAQ;AAAA,EACR,IAAI,SAAS,eAAe,EAAE,WAAW,WAAW,CAAC;AAAA,EACrD,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,UAAU;AAAA,MACR,YAAY;AAAA,QACV,KAAK;AAAA,UACH,IAAI,EAAE,OAAO,MAAM;AAAA,QACrB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,KAAK,CAAC;AACR;AAYO,IAAM,6BAAkD;AAAA,EAC7D,QAAQ;AAAA,EACR,IAAI,SAAS,eAAe,EAAE,WAAW,WAAW,CAAC;AAAA,EACrD,SAAS;AAAA,IACP,UAAU;AAAA,MACR,YAAY;AAAA,QACV,KAAK;AAAA,UACH,IAAI;AAAA,QACN;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,KAAK,CAAC;AACR;AASO,IAAM,uBAA4C;AAAA,EACvD,QAAQ;AAAA,EACR,IAAI,SAAS,kBAAkB;AAAA,IAC7B,WAAW;AAAA,IACX,IAAI;AAAA,EACN,CAAC;AAAA,EACD,SAAS;AAAA,IACP,UAAU;AAAA,MACR,YAAY;AAAA,QACV,KAAK;AAAA,UACH,IAAI,EAAE,OAAO,MAAM;AAAA,UACnB,OAAO;AAAA,UACP,SAAS;AAAA,QACX;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,KAAK;AAAA,IACH;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,QACE,eAAe;AAAA,QACf,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AACF;","names":["z"]}
1
+ {"version":3,"sources":["../src/schemas/index.ts","../src/schemas/settings.ts","../src/schemas/mapping.ts","../src/examples/index.ts","../src/examples/env.ts","../src/examples/step.ts","../src/examples/minimal.ts"],"sourcesContent":["import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\nimport { MappingSchema } from './mapping';\n\nexport { SettingsSchema, type Settings } from './settings';\nexport { MappingSchema, type Mapping } from './mapping';\n\n// JSON Schema\nexport const settings = zodToSchema(SettingsSchema);\nexport const mapping = zodToSchema(MappingSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z\n .object({\n apiKey: z\n .string()\n .min(1)\n .regex(\n /^\\d+$/,\n 'Must be a numeric LinkedIn Partner ID (digits only, e.g. \"123456\")',\n )\n .describe(\n 'Your LinkedIn Partner ID (numeric string, typically 6 to 7 digits). Find it in Campaign Manager under Insight Tag. Assigned to window._linkedin_partner_id before the Insight Tag script loads (like 1234567).',\n ),\n })\n .strict();\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\n/**\n * LinkedIn per-rule mapping schema.\n *\n * Every field on `conversion` is a walkerOS mapping value (static literal,\n * string path, or `{ map, value, key, fn, ... }` object). The schema uses\n * `z.unknown()` for each so users can supply any valid mapping shape; the\n * destination resolves it via `getMappingValue()` at push time.\n */\nexport const MappingSchema = z.object({\n conversion: z\n .unknown()\n .describe(\n 'Resolves to a LinkedIn conversion object with short keys: { id (required number, the Campaign Manager conversion_id), value? (number), currency? (ISO code), eventId? (string, the same event id the server LinkedIn destination sends, for deduplication) }. A rule whose conversion resolves to no id makes no lintrk call and fails the push with missing-input.',\n )\n .optional(),\n});\n\nexport type Mapping = z.infer<typeof MappingSchema>;\n","export * as env from './env';\nexport * as step from './step';\nexport { minimal } from './minimal';\n","import type { Env } from '../types';\n\n/**\n * Example environment configurations for LinkedIn Insight Tag destination.\n *\n * Tests clone `push` and replace `window.lintrk` with a jest.fn() to collect\n * calls. Production leaves `env` undefined — the destination mutates the real\n * `window` object and injects the LinkedIn CDN script through `loadVendor`.\n */\n\nconst noop = () => {};\n\n/**\n * Pre-init environment — no LinkedIn state present. The destination's init\n * will populate _linkedin_partner_id and install the lintrk queue.\n */\nexport const init: Env | undefined = {\n window: {\n _linkedin_partner_id: undefined,\n _linkedin_data_partner_ids: undefined,\n lintrk: undefined,\n },\n};\n\n/**\n * Post-init environment — lintrk is a spy-able no-op function carrying the\n * queue shape the real script installs. Tests clone this and replace\n * `window.lintrk` with a jest.fn() before pushing events, so every call is\n * captured.\n */\nexport const push: Env = {\n window: {\n _linkedin_partner_id: '123456',\n _linkedin_data_partner_ids: ['123456'],\n lintrk: Object.assign(noop, { q: [] }),\n },\n};\n\n/**\n * Simulation tracking paths — used by CLI `--simulate` to record which\n * function calls happened during an event push.\n */\nexport const simulation = ['call:window.lintrk'];\n","import type { Flow } from '@walkeros/core';\nimport { createEvent, getEvent } from '@walkeros/core';\nimport type { Settings } from '../types';\n\n/**\n * Examples may optionally override destination-level settings for a test.\n * The test runner reads `settings` from the example and merges it into the\n * base destination settings (on top of the fixed `apiKey`). Rarely needed\n * for LinkedIn - conversion config lives on the rule, not destination-level.\n */\nexport type LinkedInStepExample = Flow.StepExample & {\n settings?: Partial<Settings>;\n};\n\n/**\n * OPT-IN: Unmapped event is silently ignored.\n *\n * LinkedIn's core behavioral difference from analytics destinations: events\n * without `mapping.settings.conversion` produce ZERO lintrk() calls. The\n * destination is opt-in - each conversion must reference a pre-created\n * Conversion Rule from Campaign Manager.\n */\nexport const unmappedEventIgnored: LinkedInStepExample = {\n public: false,\n in: getEvent('product view', { timestamp: 1700000100 }),\n out: [],\n};\n\n/**\n * Simplest possible conversion - just a `conversion_id` from Campaign Manager.\n *\n * Form submission → LinkedIn Lead conversion. The mapping resolves `id` as a\n * literal value (no walker event field needed). The destination translates\n * `{ id }` → `lintrk('track', { conversion_id })`.\n */\nexport const simpleConversionId: LinkedInStepExample = {\n title: 'Simple conversion',\n description:\n 'A form submit fires a LinkedIn lintrk track with only a conversion_id from Campaign Manager.',\n in: createEvent({ name: 'form submit', timestamp: 1700000101 }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 12345 },\n },\n },\n },\n },\n out: [['lintrk', 'track', { conversion_id: 12345 }]],\n};\n\n/**\n * Full e-commerce conversion - every supported lintrk field populated.\n *\n * mapping config uses short walkerOS keys (`id`, `value`, `currency`, `eventId`);\n * the destination translates them to the vendor parameter names\n * (`conversion_id`, `conversion_value`, `currency`, `event_id`).\n *\n * Currency uses the walkerOS fallback syntax: `{ key, value }` - pull from\n * `data.currency` first, fall back to `\"EUR\"` if absent. The default\n * `order complete` fixture from `getEvent` already sets `data.currency: \"EUR\"`,\n * so the resolved value is \"EUR\" here.\n *\n * `eventId` maps from the walkerOS event.id - stable per event, unique, and\n * ready for deduplication with a future server (Conversions API) destination.\n */\nexport const orderCompleteFullConversion: LinkedInStepExample = {\n title: 'Ecommerce conversion',\n description:\n 'A completed order fires a LinkedIn lintrk track with conversion_id, value, currency, and event_id for deduplication.',\n in: getEvent('order complete', {\n timestamp: 1700000102,\n id: '1700000102abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 67890 },\n value: 'data.value',\n currency: { key: 'data.currency', value: 'EUR' },\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 67890,\n conversion_value: 462,\n currency: 'EUR',\n event_id: '1700000102abcdef',\n },\n ],\n ],\n};\n\n/**\n * Page view as an explicit conversion.\n *\n * LinkedIn's Insight Tag automatically fires a page view on load for\n * retargeting / audience building - that call is NOT something the\n * destination controls. This example tests the OTHER case: mapping a\n * specific walkerOS `page view` event to a Campaign Manager KEY_PAGE_VIEW\n * conversion rule, which fires an EXPLICIT lintrk('track') call in addition\n * to the auto page view.\n */\nexport const pageViewConversion: LinkedInStepExample = {\n title: 'Key page view',\n description:\n 'A page view fires an explicit lintrk track mapped to a LinkedIn KEY_PAGE_VIEW conversion rule.',\n in: getEvent('page view', {\n timestamp: 1700000103,\n id: '1700000103abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 11111 },\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 11111,\n event_id: '1700000103abcdef',\n },\n ],\n ],\n};\n\n/**\n * Middle-funnel LEAD conversion - demo request without monetary value.\n *\n * LinkedIn's conversion types include LEAD, CONTACT, SIGN_UP, etc. The\n * destination is agnostic to the type (set in Campaign Manager, not at call\n * time) - all we forward is the conversion_id. This fixture exercises the\n * \"id + eventId only\" shape.\n */\nexport const demoRequestLead: LinkedInStepExample = {\n title: 'Lead conversion',\n description:\n 'A demo request fires a LinkedIn lintrk track for a lead conversion with id and event_id only.',\n in: createEvent({\n name: 'demo request',\n timestamp: 1700000104,\n id: '1700000104abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 44444 },\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 44444,\n event_id: '1700000104abcdef',\n },\n ],\n ],\n};\n\n/**\n * rule.silent - fully-configured conversion rule temporarily disabled.\n *\n * The rule has a valid `conversion.map` but `silent: true` tells the destination\n * to produce zero calls. This is distinct from the opt-in default (no\n * `conversion` at all): silent explicitly keeps the rule on disk for quick\n * reactivation without deleting it.\n */\nexport const conversionSilenced: LinkedInStepExample = {\n public: false,\n in: createEvent({ name: 'form submit', timestamp: 1700000105 }),\n mapping: {\n silent: true,\n settings: {\n conversion: {\n map: {\n id: { value: 12345 },\n },\n },\n },\n },\n out: [],\n};\n\n/**\n * Falsy `id` → entire lintrk call is skipped and the push fails missing-input.\n *\n * If the resolved conversion object has no truthy `id`, the destination does\n * NOT call lintrk at all. This protects against misconfigured mappings\n * (e.g. pulling id from a non-existent field).\n *\n * Here we map `id` from `data.nonexistentField` - it resolves to undefined,\n * so zero calls are produced.\n */\nexport const missingConversionIdIgnored: LinkedInStepExample = {\n public: false,\n description:\n 'A conversion mapping whose id resolves to nothing makes no lintrk call, so the push fails with missing-input instead of counting as delivered.',\n in: createEvent({ name: 'form submit', timestamp: 1700000106 }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: 'data.nonexistentField',\n },\n },\n },\n },\n out: [],\n outcome: { status: 'failed', code: 'missing-input' },\n};\n\n/**\n * Partial conversion - value missing → omitted from the lintrk call.\n *\n * The rule asks for `value: 'data.missingTotal'` (undefined), `currency`\n * (undefined), and `eventId: 'id'` (present). Only `conversion_id` and\n * `event_id` appear in the final call - no `conversion_value`, no `currency`.\n */\nexport const partialFieldsOmitted: LinkedInStepExample = {\n public: false,\n in: getEvent('order complete', {\n timestamp: 1700000107,\n id: '1700000107abcdef',\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n id: { value: 67890 },\n value: 'data.missingTotal',\n eventId: 'id',\n },\n },\n },\n },\n out: [\n [\n 'lintrk',\n 'track',\n {\n conversion_id: 67890,\n event_id: '1700000107abcdef',\n },\n ],\n ],\n};\n\n/**\n * A revocation of the consent the destination requires. The Insight Tag has\n * no vendor consent mode, so the collector's consent gate is the only\n * mechanism and no vendor call is made.\n */\nexport const consentRevoke: LinkedInStepExample = {\n public: false,\n description:\n 'For a destination with config.consent { marketing: true }, revoking marketing makes no vendor call: the Insight Tag has no consent mode, the collector stops sending.',\n command: 'consent',\n in: { marketing: false },\n out: [],\n};\n","import type { Flow } from '@walkeros/core';\n\n/**\n * The settings the Insight Tag needs to deliver: the Partner ID, with the\n * Insight Tag script loaded by the destination.\n */\nexport const minimal: Flow.MinimalExample = {\n settings: { apiKey: '123456' },\n config: { loadScript: true },\n};\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAS,mBAAmB;;;ACA5B,SAAS,SAAS;AAEX,IAAM,iBAAiB,EAC3B,OAAO;AAAA,EACN,QAAQ,EACL,OAAO,EACP,IAAI,CAAC,EACL;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,EACF;AACJ,CAAC,EACA,OAAO;;;ACfV,SAAS,KAAAA,UAAS;AAUX,IAAM,gBAAgBA,GAAE,OAAO;AAAA,EACpC,YAAYA,GACT,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;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,UAAU,EAAE,QAAQ,SAAS;AAAA,EAC7B,QAAQ,EAAE,YAAY,KAAK;AAC7B;","names":["z"]}
@@ -4,7 +4,7 @@ import { Flow } from '@walkeros/core';
4
4
  /**
5
5
  * LinkedIn Insight Tag runtime surface.
6
6
  *
7
- * The Insight Tag script installs `window.lintrk` — a single function that
7
+ * The Insight Tag script installs `window.lintrk`, a single function that
8
8
  * accepts exactly one tracked action: `lintrk('track', data)`.
9
9
  *
10
10
  * Before the script loads, the destination installs a queue-backed shim so
@@ -32,24 +32,17 @@ declare global {
32
32
  /**
33
33
  * Destination-level settings.
34
34
  *
35
- * apiKey — the LinkedIn Partner ID (numeric string, e.g. "123456"), assigned
36
- * to `window._linkedin_partner_id` before the script loads.
37
- * include — event sections made available for mapping resolution. Present for
38
- * consistency with other destinations; has no effect at call time
39
- * because `lintrk()` only accepts four fixed fields. Kept so users
40
- * can reference section-prefixed keys in future custom mapping
41
- * strategies without a breaking change.
35
+ * apiKey: the LinkedIn Partner ID (numeric string, e.g. "123456"), assigned
36
+ * to `window._linkedin_partner_id` before the script loads.
42
37
  */
43
38
  interface Settings {
44
39
  apiKey: string;
45
40
  }
46
41
  /**
47
- * Env — mock surface for tests and dev. The destination mutates
42
+ * Env: mock surface for tests and dev. The destination mutates
48
43
  * `window._linkedin_partner_id` / `window._linkedin_data_partner_ids` and
49
44
  * installs `window.lintrk` in init; tests can pre-seed `window.lintrk` with
50
45
  * a spy to skip the script injection path.
51
- *
52
- * `document` is also mocked so `addScript()` can run headlessly.
53
46
  */
54
47
  interface Env extends DestinationWeb.Env {
55
48
  window: {
@@ -156,7 +149,7 @@ declare const demoRequestLead: LinkedInStepExample;
156
149
  */
157
150
  declare const conversionSilenced: LinkedInStepExample;
158
151
  /**
159
- * Falsy `id` → entire lintrk call is skipped.
152
+ * Falsy `id` → entire lintrk call is skipped and the push fails missing-input.
160
153
  *
161
154
  * If the resolved conversion object has no truthy `id`, the destination does
162
155
  * NOT call lintrk at all. This protects against misconfigured mappings
@@ -174,8 +167,15 @@ declare const missingConversionIdIgnored: LinkedInStepExample;
174
167
  * `event_id` appear in the final call - no `conversion_value`, no `currency`.
175
168
  */
176
169
  declare const partialFieldsOmitted: LinkedInStepExample;
170
+ /**
171
+ * A revocation of the consent the destination requires. The Insight Tag has
172
+ * no vendor consent mode, so the collector's consent gate is the only
173
+ * mechanism and no vendor call is made.
174
+ */
175
+ declare const consentRevoke: LinkedInStepExample;
177
176
 
178
177
  type step_LinkedInStepExample = LinkedInStepExample;
178
+ declare const step_consentRevoke: typeof consentRevoke;
179
179
  declare const step_conversionSilenced: typeof conversionSilenced;
180
180
  declare const step_demoRequestLead: typeof demoRequestLead;
181
181
  declare const step_missingConversionIdIgnored: typeof missingConversionIdIgnored;
@@ -185,7 +185,13 @@ declare const step_partialFieldsOmitted: typeof partialFieldsOmitted;
185
185
  declare const step_simpleConversionId: typeof simpleConversionId;
186
186
  declare const step_unmappedEventIgnored: typeof unmappedEventIgnored;
187
187
  declare namespace step {
188
- export { type step_LinkedInStepExample as LinkedInStepExample, step_conversionSilenced as conversionSilenced, step_demoRequestLead as demoRequestLead, step_missingConversionIdIgnored as missingConversionIdIgnored, step_orderCompleteFullConversion as orderCompleteFullConversion, step_pageViewConversion as pageViewConversion, step_partialFieldsOmitted as partialFieldsOmitted, step_simpleConversionId as simpleConversionId, step_unmappedEventIgnored as unmappedEventIgnored };
188
+ export { type step_LinkedInStepExample as LinkedInStepExample, step_consentRevoke as consentRevoke, step_conversionSilenced as conversionSilenced, step_demoRequestLead as demoRequestLead, step_missingConversionIdIgnored as missingConversionIdIgnored, step_orderCompleteFullConversion as orderCompleteFullConversion, step_pageViewConversion as pageViewConversion, step_partialFieldsOmitted as partialFieldsOmitted, step_simpleConversionId as simpleConversionId, step_unmappedEventIgnored as unmappedEventIgnored };
189
189
  }
190
190
 
191
- export { env, step };
191
+ /**
192
+ * The settings the Insight Tag needs to deliver: the Partner ID, with the
193
+ * Insight Tag script loaded by the destination.
194
+ */
195
+ declare const minimal: Flow.MinimalExample;
196
+
197
+ export { env, minimal, step };