@walkeros/server-destination-linkedin 3.3.0-next-1776098542393

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,161 @@
1
+ # @walkeros/server-destination-linkedin
2
+
3
+ LinkedIn Conversions API (CAPI) server destination for walkerOS. Streams
4
+ conversion events to LinkedIn via server-to-server HTTPS POST.
5
+
6
+ ## Installation
7
+
8
+ ```bash
9
+ npm install @walkeros/server-destination-linkedin
10
+ ```
11
+
12
+ ## Minimal Config
13
+
14
+ ```json
15
+ {
16
+ "destinations": {
17
+ "linkedin": {
18
+ "package": "@walkeros/server-destination-linkedin",
19
+ "config": {
20
+ "consent": { "marketing": true },
21
+ "settings": {
22
+ "accessToken": "$env:LINKEDIN_ACCESS_TOKEN",
23
+ "conversionRuleId": "12345678"
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }
29
+ ```
30
+
31
+ ## Full Config
32
+
33
+ ```json
34
+ {
35
+ "destinations": {
36
+ "linkedin": {
37
+ "package": "@walkeros/server-destination-linkedin",
38
+ "config": {
39
+ "consent": { "marketing": true },
40
+ "settings": {
41
+ "accessToken": "$env:LINKEDIN_ACCESS_TOKEN",
42
+ "conversionRuleId": "12345678",
43
+ "apiVersion": "202604",
44
+ "user_data": {
45
+ "email": "user.email",
46
+ "li_fat_id": "context.li_fat_id",
47
+ "firstName": "user.firstName",
48
+ "lastName": "user.lastName",
49
+ "companyName": "user.company",
50
+ "countryCode": "user.country"
51
+ }
52
+ },
53
+ "mapping": {
54
+ "order": {
55
+ "complete": {
56
+ "settings": {
57
+ "conversion": {
58
+ "map": {
59
+ "value": "data.total",
60
+ "currency": { "key": "data.currency", "value": "USD" }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "form": {
67
+ "submit": {}
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ ## Settings
77
+
78
+ | Setting | Type | Required | Default | Description |
79
+ | ------------------ | -------- | -------- | ---------------------------------- | ----------------------------------------- |
80
+ | `accessToken` | string | yes | - | OAuth 2.0 Bearer token |
81
+ | `conversionRuleId` | string | yes | - | Default conversion rule ID (numeric) |
82
+ | `apiVersion` | string | no | `"202604"` | `Linkedin-Version` header (YYYYMM format) |
83
+ | `doNotHash` | string[] | no | `[]` | User data fields already hashed |
84
+ | `url` | string | no | `"https://api.linkedin.com/rest/"` | API base URL override |
85
+ | `user_data` | object | no | - | Mapping config for user identifiers |
86
+
87
+ ## Mapping Settings
88
+
89
+ Per-event overrides via `mapping.settings.conversion`:
90
+
91
+ | Field | Type | Description |
92
+ | ---------- | ------------- | ------------------------------------------ |
93
+ | `ruleId` | string | Override `conversionRuleId` for this event |
94
+ | `value` | string/number | Conversion monetary value |
95
+ | `currency` | string | ISO 4217 currency code |
96
+
97
+ ## User Identification
98
+
99
+ The destination supports two user identifier types:
100
+
101
+ - **SHA256_EMAIL** - Email address, automatically SHA-256 hashed (lowercase,
102
+ trimmed). Source: `user.email` or `settings.user_data.email` mapping.
103
+ - **LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID** - LinkedIn first-party click ID
104
+ (`li_fat_id`). Not hashed. Source: `settings.user_data.li_fat_id` mapping.
105
+
106
+ At least one identifier is required per event. Events without any identifier are
107
+ silently skipped.
108
+
109
+ Optional `userInfo` fields (improve match rate): `firstName`, `lastName`,
110
+ `title`, `companyName`, `countryCode`. Requires both `firstName` and `lastName`
111
+ to be present.
112
+
113
+ ## Deduplication
114
+
115
+ The walkerOS event `id` is automatically sent as `eventId` in the CAPI payload.
116
+ When both the web destination (Insight Tag) and server destination are active,
117
+ LinkedIn deduplicates using this shared ID. The browser event takes priority.
118
+
119
+ ## Multi-Rule Setup
120
+
121
+ Use separate destination instances for different conversion rules:
122
+
123
+ ```json
124
+ {
125
+ "destinations": {
126
+ "linkedin-purchases": {
127
+ "package": "@walkeros/server-destination-linkedin",
128
+ "config": {
129
+ "settings": {
130
+ "accessToken": "$env:LINKEDIN_TOKEN",
131
+ "conversionRuleId": "11111111"
132
+ },
133
+ "mapping": { "order": { "complete": {} } }
134
+ }
135
+ },
136
+ "linkedin-leads": {
137
+ "package": "@walkeros/server-destination-linkedin",
138
+ "config": {
139
+ "settings": {
140
+ "accessToken": "$env:LINKEDIN_TOKEN",
141
+ "conversionRuleId": "22222222"
142
+ },
143
+ "mapping": { "form": { "submit": {} } }
144
+ }
145
+ }
146
+ }
147
+ }
148
+ ```
149
+
150
+ ## Consent
151
+
152
+ Marketing consent is required. Configure via `config.consent`:
153
+
154
+ ```json
155
+ "consent": { "marketing": true }
156
+ ```
157
+
158
+ ## Links
159
+
160
+ - [LinkedIn Conversions API docs](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/conversions-api)
161
+ - [walkerOS documentation](https://www.walkeros.io/docs/destinations/server/linkedin-capi)
package/dist/dev.d.mts ADDED
@@ -0,0 +1,99 @@
1
+ import * as _walkeros_core_dev from '@walkeros/core/dev';
2
+ import { z } from '@walkeros/core/dev';
3
+ import { DestinationServer, sendServer } from '@walkeros/server-core';
4
+ import { Flow } from '@walkeros/core';
5
+
6
+ /**
7
+ * LinkedIn User ID Type Enum
8
+ * Types of user identifiers supported by LinkedIn Conversions API
9
+ */
10
+ declare const UserIdTypeSchema: z.ZodEnum<{
11
+ SHA256_EMAIL: "SHA256_EMAIL";
12
+ LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID: "LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID";
13
+ ACXIOM_ID: "ACXIOM_ID";
14
+ ORACLE_MOAT_ID: "ORACLE_MOAT_ID";
15
+ }>;
16
+ /**
17
+ * API Version Schema
18
+ * LinkedIn-Version header value in YYYYMM format
19
+ */
20
+ declare const ApiVersionSchema: z.ZodString;
21
+
22
+ declare const SettingsSchema: z.ZodObject<{
23
+ accessToken: z.ZodString;
24
+ conversionRuleId: z.ZodString;
25
+ apiVersion: z.ZodOptional<z.ZodString>;
26
+ doNotHash: z.ZodOptional<z.ZodArray<z.ZodString>>;
27
+ url: z.ZodOptional<z.ZodString>;
28
+ user_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
29
+ }, z.core.$strip>;
30
+ type Settings = z.infer<typeof SettingsSchema>;
31
+
32
+ /**
33
+ * LinkedIn Conversions API Mapping Schema
34
+ *
35
+ * Per-event override for conversion rule, value, and currency.
36
+ * The `conversion` field is a mapping value that resolves to an object
37
+ * with optional `ruleId`, `value`, and `currency` keys.
38
+ */
39
+ declare const MappingSchema: z.ZodObject<{
40
+ conversion: z.ZodOptional<z.ZodObject<{
41
+ ruleId: z.ZodOptional<z.ZodString>;
42
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
43
+ currency: z.ZodOptional<z.ZodString>;
44
+ }, z.core.$strip>>;
45
+ }, z.core.$strip>;
46
+ type Mapping = z.infer<typeof MappingSchema>;
47
+
48
+ declare const settings: _walkeros_core_dev.JSONSchema;
49
+ declare const mapping: _walkeros_core_dev.JSONSchema;
50
+
51
+ declare const index$1_ApiVersionSchema: typeof ApiVersionSchema;
52
+ type index$1_Mapping = Mapping;
53
+ declare const index$1_MappingSchema: typeof MappingSchema;
54
+ type index$1_Settings = Settings;
55
+ declare const index$1_SettingsSchema: typeof SettingsSchema;
56
+ declare const index$1_UserIdTypeSchema: typeof UserIdTypeSchema;
57
+ declare const index$1_mapping: typeof mapping;
58
+ declare const index$1_settings: typeof settings;
59
+ declare namespace index$1 {
60
+ export { index$1_ApiVersionSchema as ApiVersionSchema, type index$1_Mapping as Mapping, index$1_MappingSchema as MappingSchema, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, index$1_UserIdTypeSchema as UserIdTypeSchema, index$1_mapping as mapping, index$1_settings as settings };
61
+ }
62
+
63
+ interface Env extends DestinationServer.Env {
64
+ sendServer?: typeof sendServer;
65
+ }
66
+
67
+ /**
68
+ * Standard mock environment for push operations
69
+ *
70
+ * Use this for testing LinkedIn Conversions API events without making
71
+ * actual HTTP requests to LinkedIn's servers.
72
+ */
73
+ declare const push: Env;
74
+ declare const simulation: string[];
75
+
76
+ declare const env_push: typeof push;
77
+ declare const env_simulation: typeof simulation;
78
+ declare namespace env {
79
+ export { env_push as push, env_simulation as simulation };
80
+ }
81
+
82
+ declare const purchase: Flow.StepExample;
83
+ declare const lead: Flow.StepExample;
84
+ declare const purchaseWithLiFatId: Flow.StepExample;
85
+
86
+ declare const step_lead: typeof lead;
87
+ declare const step_purchase: typeof purchase;
88
+ declare const step_purchaseWithLiFatId: typeof purchaseWithLiFatId;
89
+ declare namespace step {
90
+ export { step_lead as lead, step_purchase as purchase, step_purchaseWithLiFatId as purchaseWithLiFatId };
91
+ }
92
+
93
+ declare const index_env: typeof env;
94
+ declare const index_step: typeof step;
95
+ declare namespace index {
96
+ export { index_env as env, index_step as step };
97
+ }
98
+
99
+ export { index as examples, index$1 as schemas };
package/dist/dev.d.ts ADDED
@@ -0,0 +1,99 @@
1
+ import * as _walkeros_core_dev from '@walkeros/core/dev';
2
+ import { z } from '@walkeros/core/dev';
3
+ import { DestinationServer, sendServer } from '@walkeros/server-core';
4
+ import { Flow } from '@walkeros/core';
5
+
6
+ /**
7
+ * LinkedIn User ID Type Enum
8
+ * Types of user identifiers supported by LinkedIn Conversions API
9
+ */
10
+ declare const UserIdTypeSchema: z.ZodEnum<{
11
+ SHA256_EMAIL: "SHA256_EMAIL";
12
+ LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID: "LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID";
13
+ ACXIOM_ID: "ACXIOM_ID";
14
+ ORACLE_MOAT_ID: "ORACLE_MOAT_ID";
15
+ }>;
16
+ /**
17
+ * API Version Schema
18
+ * LinkedIn-Version header value in YYYYMM format
19
+ */
20
+ declare const ApiVersionSchema: z.ZodString;
21
+
22
+ declare const SettingsSchema: z.ZodObject<{
23
+ accessToken: z.ZodString;
24
+ conversionRuleId: z.ZodString;
25
+ apiVersion: z.ZodOptional<z.ZodString>;
26
+ doNotHash: z.ZodOptional<z.ZodArray<z.ZodString>>;
27
+ url: z.ZodOptional<z.ZodString>;
28
+ user_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
29
+ }, z.core.$strip>;
30
+ type Settings = z.infer<typeof SettingsSchema>;
31
+
32
+ /**
33
+ * LinkedIn Conversions API Mapping Schema
34
+ *
35
+ * Per-event override for conversion rule, value, and currency.
36
+ * The `conversion` field is a mapping value that resolves to an object
37
+ * with optional `ruleId`, `value`, and `currency` keys.
38
+ */
39
+ declare const MappingSchema: z.ZodObject<{
40
+ conversion: z.ZodOptional<z.ZodObject<{
41
+ ruleId: z.ZodOptional<z.ZodString>;
42
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
43
+ currency: z.ZodOptional<z.ZodString>;
44
+ }, z.core.$strip>>;
45
+ }, z.core.$strip>;
46
+ type Mapping = z.infer<typeof MappingSchema>;
47
+
48
+ declare const settings: _walkeros_core_dev.JSONSchema;
49
+ declare const mapping: _walkeros_core_dev.JSONSchema;
50
+
51
+ declare const index$1_ApiVersionSchema: typeof ApiVersionSchema;
52
+ type index$1_Mapping = Mapping;
53
+ declare const index$1_MappingSchema: typeof MappingSchema;
54
+ type index$1_Settings = Settings;
55
+ declare const index$1_SettingsSchema: typeof SettingsSchema;
56
+ declare const index$1_UserIdTypeSchema: typeof UserIdTypeSchema;
57
+ declare const index$1_mapping: typeof mapping;
58
+ declare const index$1_settings: typeof settings;
59
+ declare namespace index$1 {
60
+ export { index$1_ApiVersionSchema as ApiVersionSchema, type index$1_Mapping as Mapping, index$1_MappingSchema as MappingSchema, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, index$1_UserIdTypeSchema as UserIdTypeSchema, index$1_mapping as mapping, index$1_settings as settings };
61
+ }
62
+
63
+ interface Env extends DestinationServer.Env {
64
+ sendServer?: typeof sendServer;
65
+ }
66
+
67
+ /**
68
+ * Standard mock environment for push operations
69
+ *
70
+ * Use this for testing LinkedIn Conversions API events without making
71
+ * actual HTTP requests to LinkedIn's servers.
72
+ */
73
+ declare const push: Env;
74
+ declare const simulation: string[];
75
+
76
+ declare const env_push: typeof push;
77
+ declare const env_simulation: typeof simulation;
78
+ declare namespace env {
79
+ export { env_push as push, env_simulation as simulation };
80
+ }
81
+
82
+ declare const purchase: Flow.StepExample;
83
+ declare const lead: Flow.StepExample;
84
+ declare const purchaseWithLiFatId: Flow.StepExample;
85
+
86
+ declare const step_lead: typeof lead;
87
+ declare const step_purchase: typeof purchase;
88
+ declare const step_purchaseWithLiFatId: typeof purchaseWithLiFatId;
89
+ declare namespace step {
90
+ export { step_lead as lead, step_purchase as purchase, step_purchaseWithLiFatId as purchaseWithLiFatId };
91
+ }
92
+
93
+ declare const index_env: typeof env;
94
+ declare const index_step: typeof step;
95
+ declare namespace index {
96
+ export { index_env as env, index_step as step };
97
+ }
98
+
99
+ export { index as examples, index$1 as schemas };
package/dist/dev.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";var e,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,t=(e,n)=>{for(var o in n)r(e,o,{get:n[o],enumerable:!0})},i={};t(i,{examples:()=>g,schemas:()=>s}),module.exports=(e=i,((e,t,i,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let c of o(t))a.call(e,c)||c===i||r(e,c,{get:()=>t[c],enumerable:!(s=n(t,c))||s.enumerable});return e})(r({},"__esModule",{value:!0}),e));var s={};t(s,{ApiVersionSchema:()=>p,MappingSchema:()=>b,SettingsSchema:()=>m,UserIdTypeSchema:()=>l,mapping:()=>I,settings:()=>f});var c=require("@walkeros/core/dev"),d=require("@walkeros/core/dev"),u=require("@walkeros/core/dev"),l=u.z.enum(["SHA256_EMAIL","LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID","ACXIOM_ID","ORACLE_MOAT_ID"]),p=u.z.string().regex(/^\d{6}$/,"API version must be in YYYYMM format (e.g. 202604)"),m=d.z.object({accessToken:d.z.string().min(1).describe("LinkedIn OAuth 2.0 Bearer token for Conversions API authentication (like AQX...)"),conversionRuleId:d.z.string().regex(/^[0-9]+$/,"Conversion rule ID must contain only digits").describe("Default LinkedIn conversion rule ID from Campaign Manager (like 12345678)"),apiVersion:p.describe("Linkedin-Version header value in YYYYMM format (like 202604)").optional(),doNotHash:d.z.array(d.z.string()).describe("Array of user data fields that should not be hashed (like ['email'])").optional(),url:d.z.string().url().describe("Custom URL for LinkedIn Conversions API endpoint (like https://api.linkedin.com/rest/)").optional(),user_data:d.z.record(d.z.string(),d.z.string()).describe("Mapping configuration for user data fields (like { email: 'user.email', li_fat_id: 'context.li_fat_id' })").optional()}),v=require("@walkeros/core/dev"),b=v.z.object({conversion:v.z.object({ruleId:v.z.string().describe("Override conversion rule ID for this event").optional(),value:v.z.union([v.z.string(),v.z.number()]).describe("Conversion monetary value").optional(),currency:v.z.string().describe("ISO 4217 currency code (like USD, EUR)").optional()}).describe("Per-event conversion override with ruleId, value, and currency").optional()}),f=(0,c.zodToSchema)(m),I=(0,c.zodToSchema)(b),g={};t(g,{env:()=>y,step:()=>A});var y={};t(y,{push:()=>_,simulation:()=>h});var _={sendServer:async function(e,r,n){return{ok:!0,data:{}}}},h=["sendServer"],A={};t(A,{lead:()=>z,purchase:()=>S,purchaseWithLiFatId:()=>D});var k=require("@walkeros/core"),S={in:(0,k.getEvent)("order complete",{timestamp:17000009e5,data:{total:249.99,currency:"EUR"},user:{email:"jane@example.com"},source:{type:"server",id:"https://shop.example.com",previous_id:""}}),mapping:{settings:{conversion:{map:{value:"data.total",currency:{key:"data.currency",value:"EUR"}}}}},out:{elements:[{conversion:"urn:lla:llaPartnerConversion:12345678",conversionHappenedAt:17000009e5,conversionValue:{currencyCode:"EUR",amount:"249.99"},user:{userIds:[{idType:"SHA256_EMAIL",idValue:"8c87b489ce35cf2e2f39f80e282cb2e804932a56a213983eeeb428407d43b52d"}]},eventId:"1700000900000-gr0up-1"}]}},z={in:(0,k.getEvent)("form submit",{timestamp:1700000901e3,user:{email:"user@example.com"},source:{type:"server",id:"https://example.com",previous_id:""}}),mapping:void 0,out:{elements:[{conversion:"urn:lla:llaPartnerConversion:12345678",conversionHappenedAt:1700000901e3,user:{userIds:[{idType:"SHA256_EMAIL",idValue:"b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514"}]},eventId:"1700000901000-gr0up-1"}]}},D={in:(0,k.getEvent)("order complete",{timestamp:1700000902e3,data:{total:89.99,currency:"USD"},user:{email:"buyer@co.com"},context:{li_fat_id:["abc123-fat-id",0]},source:{type:"server",id:"https://shop.example.com",previous_id:""}}),mapping:{settings:{conversion:{map:{value:"data.total",currency:{key:"data.currency",value:"USD"}}}},data:{map:{user_data:{map:{li_fat_id:"context.li_fat_id"}}}}},out:{elements:[{conversion:"urn:lla:llaPartnerConversion:12345678",conversionHappenedAt:1700000902e3,conversionValue:{currencyCode:"USD",amount:"89.99"},user:{userIds:[{idType:"SHA256_EMAIL",idValue:"484c39bfb51212665d9673805c112b5ba04cbf0460b6d3f00bcdc18b92afed66"},{idType:"LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID",idValue:"abc123-fat-id"}]},eventId:"1700000902000-gr0up-1"}]}};//# sourceMappingURL=dev.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dev.ts","../src/schemas/index.ts","../src/schemas/settings.ts","../src/schemas/primitives.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 * from './primitives';\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';\nimport { ApiVersionSchema } from './primitives';\n\nexport const SettingsSchema = z.object({\n accessToken: z\n .string()\n .min(1)\n .describe(\n 'LinkedIn OAuth 2.0 Bearer token for Conversions API authentication (like AQX...)',\n ),\n conversionRuleId: z\n .string()\n .regex(/^[0-9]+$/, 'Conversion rule ID must contain only digits')\n .describe(\n 'Default LinkedIn conversion rule ID from Campaign Manager (like 12345678)',\n ),\n apiVersion: ApiVersionSchema.describe(\n 'Linkedin-Version header value in YYYYMM format (like 202604)',\n ).optional(),\n doNotHash: z\n .array(z.string())\n .describe(\n \"Array of user data fields that should not be hashed (like ['email'])\",\n )\n .optional(),\n url: z\n .string()\n .url()\n .describe(\n 'Custom URL for LinkedIn Conversions API endpoint (like https://api.linkedin.com/rest/)',\n )\n .optional(),\n user_data: z\n .record(z.string(), z.string())\n .describe(\n \"Mapping configuration for user data fields (like { email: 'user.email', li_fat_id: 'context.li_fat_id' })\",\n )\n .optional(),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\n/**\n * LinkedIn User ID Type Enum\n * Types of user identifiers supported by LinkedIn Conversions API\n */\nexport const UserIdTypeSchema = z.enum([\n 'SHA256_EMAIL',\n 'LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID',\n 'ACXIOM_ID',\n 'ORACLE_MOAT_ID',\n]);\n\n/**\n * API Version Schema\n * LinkedIn-Version header value in YYYYMM format\n */\nexport const ApiVersionSchema = z\n .string()\n .regex(/^\\d{6}$/, 'API version must be in YYYYMM format (e.g. 202604)');\n","import { z } from '@walkeros/core/dev';\n\n/**\n * LinkedIn Conversions API Mapping Schema\n *\n * Per-event override for conversion rule, value, and currency.\n * The `conversion` field is a mapping value that resolves to an object\n * with optional `ruleId`, `value`, and `currency` keys.\n */\nexport const MappingSchema = z.object({\n conversion: z\n .object({\n ruleId: z\n .string()\n .describe('Override conversion rule ID for this event')\n .optional(),\n value: z\n .union([z.string(), z.number()])\n .describe('Conversion monetary value')\n .optional(),\n currency: z\n .string()\n .describe('ISO 4217 currency code (like USD, EUR)')\n .optional(),\n })\n .describe('Per-event conversion override with ruleId, value, and currency')\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 { SendDataValue, SendResponse } from '@walkeros/core';\nimport type { SendServerOptions } from '@walkeros/server-core';\nimport type { Env } from '../types';\n\n/**\n * Example environment configurations for LinkedIn Conversions API destination\n *\n * These environments provide standardized mock structures for testing\n * and development without requiring actual HTTP requests.\n */\n\n/**\n * Mock sendServer function that simulates successful HTTP responses\n */\nasync function mockSendServer(\n url: string,\n data?: SendDataValue,\n options?: SendServerOptions,\n): Promise<SendResponse> {\n return {\n ok: true,\n data: {},\n };\n}\n\n/**\n * Standard mock environment for push operations\n *\n * Use this for testing LinkedIn Conversions API events without making\n * actual HTTP requests to LinkedIn's servers.\n */\nexport const push: Env = {\n sendServer: mockSendServer,\n};\n\nexport const simulation = ['sendServer'];\n","import type { Flow } from '@walkeros/core';\nimport { getEvent } from '@walkeros/core';\n\nexport const purchase: Flow.StepExample = {\n in: getEvent('order complete', {\n timestamp: 1700000900000,\n data: { total: 249.99, currency: 'EUR' },\n user: { email: 'jane@example.com' },\n source: { type: 'server', id: 'https://shop.example.com', previous_id: '' },\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n value: 'data.total',\n currency: { key: 'data.currency', value: 'EUR' },\n },\n },\n },\n },\n out: {\n elements: [\n {\n conversion: 'urn:lla:llaPartnerConversion:12345678',\n conversionHappenedAt: 1700000900000,\n conversionValue: {\n currencyCode: 'EUR',\n amount: '249.99',\n },\n user: {\n userIds: [\n {\n idType: 'SHA256_EMAIL',\n idValue:\n '8c87b489ce35cf2e2f39f80e282cb2e804932a56a213983eeeb428407d43b52d',\n },\n ],\n },\n eventId: '1700000900000-gr0up-1',\n },\n ],\n },\n};\n\nexport const lead: Flow.StepExample = {\n in: getEvent('form submit', {\n timestamp: 1700000901000,\n user: { email: 'user@example.com' },\n source: { type: 'server', id: 'https://example.com', previous_id: '' },\n }),\n mapping: undefined,\n out: {\n elements: [\n {\n conversion: 'urn:lla:llaPartnerConversion:12345678',\n conversionHappenedAt: 1700000901000,\n user: {\n userIds: [\n {\n idType: 'SHA256_EMAIL',\n idValue:\n 'b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514',\n },\n ],\n },\n eventId: '1700000901000-gr0up-1',\n },\n ],\n },\n};\n\nexport const purchaseWithLiFatId: Flow.StepExample = {\n in: getEvent('order complete', {\n timestamp: 1700000902000,\n data: { total: 89.99, currency: 'USD' },\n user: { email: 'buyer@co.com' },\n context: { li_fat_id: ['abc123-fat-id', 0] },\n source: { type: 'server', id: 'https://shop.example.com', previous_id: '' },\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n value: 'data.total',\n currency: { key: 'data.currency', value: 'USD' },\n },\n },\n },\n data: {\n map: {\n user_data: {\n map: {\n li_fat_id: 'context.li_fat_id',\n },\n },\n },\n },\n },\n out: {\n elements: [\n {\n conversion: 'urn:lla:llaPartnerConversion:12345678',\n conversionHappenedAt: 1700000902000,\n conversionValue: {\n currencyCode: 'USD',\n amount: '89.99',\n },\n user: {\n userIds: [\n {\n idType: 'SHA256_EMAIL',\n idValue:\n '484c39bfb51212665d9673805c112b5ba04cbf0460b6d3f00bcdc18b92afed66',\n },\n {\n idType: 'LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID',\n idValue: 'abc123-fat-id',\n },\n ],\n },\n eventId: '1700000902000-gr0up-1',\n },\n ],\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,cAA4B;;;ACA5B,IAAAC,cAAkB;;;ACAlB,iBAAkB;AAMX,IAAM,mBAAmB,aAAE,KAAK;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AAQ;AAAA,cACR,SACE;AAAA,YACJ;AAAA,UACF;AAAA,QACF;AAAA,QACA,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF;AAEO,IAAM,sBAAwC;AAAA,EACnD,QAAI,sBAAS,kBAAkB;AAAA,IAC7B,WAAW;AAAA,IACX,MAAM,EAAE,OAAO,OAAO,UAAU,MAAM;AAAA,IACtC,MAAM,EAAE,OAAO,eAAe;AAAA,IAC9B,SAAS,EAAE,WAAW,CAAC,iBAAiB,CAAC,EAAE;AAAA,IAC3C,QAAQ,EAAE,MAAM,UAAU,IAAI,4BAA4B,aAAa,GAAG;AAAA,EAC5E,CAAC;AAAA,EACD,SAAS;AAAA,IACP,UAAU;AAAA,MACR,YAAY;AAAA,QACV,KAAK;AAAA,UACH,OAAO;AAAA,UACP,UAAU,EAAE,KAAK,iBAAiB,OAAO,MAAM;AAAA,QACjD;AAAA,MACF;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ,KAAK;AAAA,QACH,WAAW;AAAA,UACT,KAAK;AAAA,YACH,WAAW;AAAA,UACb;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,KAAK;AAAA,IACH,UAAU;AAAA,MACR;AAAA,QACE,YAAY;AAAA,QACZ,sBAAsB;AAAA,QACtB,iBAAiB;AAAA,UACf,cAAc;AAAA,UACd,QAAQ;AAAA,QACV;AAAA,QACA,MAAM;AAAA,UACJ,SAAS;AAAA,YACP;AAAA,cACE,QAAQ;AAAA,cACR,SACE;AAAA,YACJ;AAAA,YACA;AAAA,cACE,QAAQ;AAAA,cACR,SAAS;AAAA,YACX;AAAA,UACF;AAAA,QACF;AAAA,QACA,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF;","names":["import_dev","import_dev","import_dev"]}
package/dist/dev.mjs ADDED
@@ -0,0 +1 @@
1
+ var e=Object.defineProperty,r=(r,a)=>{for(var n in a)e(r,n,{get:a[n],enumerable:!0})},a={};r(a,{ApiVersionSchema:()=>s,MappingSchema:()=>l,SettingsSchema:()=>c,UserIdTypeSchema:()=>t,mapping:()=>p,settings:()=>u});import{zodToSchema as n}from"@walkeros/core/dev";import{z as i}from"@walkeros/core/dev";import{z as o}from"@walkeros/core/dev";var t=o.enum(["SHA256_EMAIL","LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID","ACXIOM_ID","ORACLE_MOAT_ID"]),s=o.string().regex(/^\d{6}$/,"API version must be in YYYYMM format (e.g. 202604)"),c=i.object({accessToken:i.string().min(1).describe("LinkedIn OAuth 2.0 Bearer token for Conversions API authentication (like AQX...)"),conversionRuleId:i.string().regex(/^[0-9]+$/,"Conversion rule ID must contain only digits").describe("Default LinkedIn conversion rule ID from Campaign Manager (like 12345678)"),apiVersion:s.describe("Linkedin-Version header value in YYYYMM format (like 202604)").optional(),doNotHash:i.array(i.string()).describe("Array of user data fields that should not be hashed (like ['email'])").optional(),url:i.string().url().describe("Custom URL for LinkedIn Conversions API endpoint (like https://api.linkedin.com/rest/)").optional(),user_data:i.record(i.string(),i.string()).describe("Mapping configuration for user data fields (like { email: 'user.email', li_fat_id: 'context.li_fat_id' })").optional()});import{z as d}from"@walkeros/core/dev";var l=d.object({conversion:d.object({ruleId:d.string().describe("Override conversion rule ID for this event").optional(),value:d.union([d.string(),d.number()]).describe("Conversion monetary value").optional(),currency:d.string().describe("ISO 4217 currency code (like USD, EUR)").optional()}).describe("Per-event conversion override with ruleId, value, and currency").optional()}),u=n(c),p=n(l),m={};r(m,{env:()=>v,step:()=>I});var v={};r(v,{push:()=>f,simulation:()=>b});var f={sendServer:async function(e,r,a){return{ok:!0,data:{}}}},b=["sendServer"],I={};r(I,{lead:()=>y,purchase:()=>g,purchaseWithLiFatId:()=>A});import{getEvent as _}from"@walkeros/core";var g={in:_("order complete",{timestamp:17000009e5,data:{total:249.99,currency:"EUR"},user:{email:"jane@example.com"},source:{type:"server",id:"https://shop.example.com",previous_id:""}}),mapping:{settings:{conversion:{map:{value:"data.total",currency:{key:"data.currency",value:"EUR"}}}}},out:{elements:[{conversion:"urn:lla:llaPartnerConversion:12345678",conversionHappenedAt:17000009e5,conversionValue:{currencyCode:"EUR",amount:"249.99"},user:{userIds:[{idType:"SHA256_EMAIL",idValue:"8c87b489ce35cf2e2f39f80e282cb2e804932a56a213983eeeb428407d43b52d"}]},eventId:"1700000900000-gr0up-1"}]}},y={in:_("form submit",{timestamp:1700000901e3,user:{email:"user@example.com"},source:{type:"server",id:"https://example.com",previous_id:""}}),mapping:void 0,out:{elements:[{conversion:"urn:lla:llaPartnerConversion:12345678",conversionHappenedAt:1700000901e3,user:{userIds:[{idType:"SHA256_EMAIL",idValue:"b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514"}]},eventId:"1700000901000-gr0up-1"}]}},A={in:_("order complete",{timestamp:1700000902e3,data:{total:89.99,currency:"USD"},user:{email:"buyer@co.com"},context:{li_fat_id:["abc123-fat-id",0]},source:{type:"server",id:"https://shop.example.com",previous_id:""}}),mapping:{settings:{conversion:{map:{value:"data.total",currency:{key:"data.currency",value:"USD"}}}},data:{map:{user_data:{map:{li_fat_id:"context.li_fat_id"}}}}},out:{elements:[{conversion:"urn:lla:llaPartnerConversion:12345678",conversionHappenedAt:1700000902e3,conversionValue:{currencyCode:"USD",amount:"89.99"},user:{userIds:[{idType:"SHA256_EMAIL",idValue:"484c39bfb51212665d9673805c112b5ba04cbf0460b6d3f00bcdc18b92afed66"},{idType:"LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID",idValue:"abc123-fat-id"}]},eventId:"1700000902000-gr0up-1"}]}};export{m as examples,a as schemas};//# sourceMappingURL=dev.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas/index.ts","../src/schemas/settings.ts","../src/schemas/primitives.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 * from './primitives';\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';\nimport { ApiVersionSchema } from './primitives';\n\nexport const SettingsSchema = z.object({\n accessToken: z\n .string()\n .min(1)\n .describe(\n 'LinkedIn OAuth 2.0 Bearer token for Conversions API authentication (like AQX...)',\n ),\n conversionRuleId: z\n .string()\n .regex(/^[0-9]+$/, 'Conversion rule ID must contain only digits')\n .describe(\n 'Default LinkedIn conversion rule ID from Campaign Manager (like 12345678)',\n ),\n apiVersion: ApiVersionSchema.describe(\n 'Linkedin-Version header value in YYYYMM format (like 202604)',\n ).optional(),\n doNotHash: z\n .array(z.string())\n .describe(\n \"Array of user data fields that should not be hashed (like ['email'])\",\n )\n .optional(),\n url: z\n .string()\n .url()\n .describe(\n 'Custom URL for LinkedIn Conversions API endpoint (like https://api.linkedin.com/rest/)',\n )\n .optional(),\n user_data: z\n .record(z.string(), z.string())\n .describe(\n \"Mapping configuration for user data fields (like { email: 'user.email', li_fat_id: 'context.li_fat_id' })\",\n )\n .optional(),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\n/**\n * LinkedIn User ID Type Enum\n * Types of user identifiers supported by LinkedIn Conversions API\n */\nexport const UserIdTypeSchema = z.enum([\n 'SHA256_EMAIL',\n 'LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID',\n 'ACXIOM_ID',\n 'ORACLE_MOAT_ID',\n]);\n\n/**\n * API Version Schema\n * LinkedIn-Version header value in YYYYMM format\n */\nexport const ApiVersionSchema = z\n .string()\n .regex(/^\\d{6}$/, 'API version must be in YYYYMM format (e.g. 202604)');\n","import { z } from '@walkeros/core/dev';\n\n/**\n * LinkedIn Conversions API Mapping Schema\n *\n * Per-event override for conversion rule, value, and currency.\n * The `conversion` field is a mapping value that resolves to an object\n * with optional `ruleId`, `value`, and `currency` keys.\n */\nexport const MappingSchema = z.object({\n conversion: z\n .object({\n ruleId: z\n .string()\n .describe('Override conversion rule ID for this event')\n .optional(),\n value: z\n .union([z.string(), z.number()])\n .describe('Conversion monetary value')\n .optional(),\n currency: z\n .string()\n .describe('ISO 4217 currency code (like USD, EUR)')\n .optional(),\n })\n .describe('Per-event conversion override with ruleId, value, and currency')\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 { SendDataValue, SendResponse } from '@walkeros/core';\nimport type { SendServerOptions } from '@walkeros/server-core';\nimport type { Env } from '../types';\n\n/**\n * Example environment configurations for LinkedIn Conversions API destination\n *\n * These environments provide standardized mock structures for testing\n * and development without requiring actual HTTP requests.\n */\n\n/**\n * Mock sendServer function that simulates successful HTTP responses\n */\nasync function mockSendServer(\n url: string,\n data?: SendDataValue,\n options?: SendServerOptions,\n): Promise<SendResponse> {\n return {\n ok: true,\n data: {},\n };\n}\n\n/**\n * Standard mock environment for push operations\n *\n * Use this for testing LinkedIn Conversions API events without making\n * actual HTTP requests to LinkedIn's servers.\n */\nexport const push: Env = {\n sendServer: mockSendServer,\n};\n\nexport const simulation = ['sendServer'];\n","import type { Flow } from '@walkeros/core';\nimport { getEvent } from '@walkeros/core';\n\nexport const purchase: Flow.StepExample = {\n in: getEvent('order complete', {\n timestamp: 1700000900000,\n data: { total: 249.99, currency: 'EUR' },\n user: { email: 'jane@example.com' },\n source: { type: 'server', id: 'https://shop.example.com', previous_id: '' },\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n value: 'data.total',\n currency: { key: 'data.currency', value: 'EUR' },\n },\n },\n },\n },\n out: {\n elements: [\n {\n conversion: 'urn:lla:llaPartnerConversion:12345678',\n conversionHappenedAt: 1700000900000,\n conversionValue: {\n currencyCode: 'EUR',\n amount: '249.99',\n },\n user: {\n userIds: [\n {\n idType: 'SHA256_EMAIL',\n idValue:\n '8c87b489ce35cf2e2f39f80e282cb2e804932a56a213983eeeb428407d43b52d',\n },\n ],\n },\n eventId: '1700000900000-gr0up-1',\n },\n ],\n },\n};\n\nexport const lead: Flow.StepExample = {\n in: getEvent('form submit', {\n timestamp: 1700000901000,\n user: { email: 'user@example.com' },\n source: { type: 'server', id: 'https://example.com', previous_id: '' },\n }),\n mapping: undefined,\n out: {\n elements: [\n {\n conversion: 'urn:lla:llaPartnerConversion:12345678',\n conversionHappenedAt: 1700000901000,\n user: {\n userIds: [\n {\n idType: 'SHA256_EMAIL',\n idValue:\n 'b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514',\n },\n ],\n },\n eventId: '1700000901000-gr0up-1',\n },\n ],\n },\n};\n\nexport const purchaseWithLiFatId: Flow.StepExample = {\n in: getEvent('order complete', {\n timestamp: 1700000902000,\n data: { total: 89.99, currency: 'USD' },\n user: { email: 'buyer@co.com' },\n context: { li_fat_id: ['abc123-fat-id', 0] },\n source: { type: 'server', id: 'https://shop.example.com', previous_id: '' },\n }),\n mapping: {\n settings: {\n conversion: {\n map: {\n value: 'data.total',\n currency: { key: 'data.currency', value: 'USD' },\n },\n },\n },\n data: {\n map: {\n user_data: {\n map: {\n li_fat_id: 'context.li_fat_id',\n },\n },\n },\n },\n },\n out: {\n elements: [\n {\n conversion: 'urn:lla:llaPartnerConversion:12345678',\n conversionHappenedAt: 1700000902000,\n conversionValue: {\n currencyCode: 'USD',\n amount: '89.99',\n },\n user: {\n userIds: [\n {\n idType: 'SHA256_EMAIL',\n idValue:\n '484c39bfb51212665d9673805c112b5ba04cbf0460b6d3f00bcdc18b92afed66',\n },\n {\n idType: 'LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID',\n idValue: 'abc123-fat-id',\n },\n ],\n },\n eventId: '1700000902000-gr0up-1',\n },\n ],\n },\n};\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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@@ -0,0 +1,34 @@
1
+ import { DestinationServer, sendServer } from '@walkeros/server-core';
2
+ import { Flow } from '@walkeros/core';
3
+
4
+ interface Env extends DestinationServer.Env {
5
+ sendServer?: typeof sendServer;
6
+ }
7
+
8
+ /**
9
+ * Standard mock environment for push operations
10
+ *
11
+ * Use this for testing LinkedIn Conversions API events without making
12
+ * actual HTTP requests to LinkedIn's servers.
13
+ */
14
+ declare const push: Env;
15
+ declare const simulation: string[];
16
+
17
+ declare const env_push: typeof push;
18
+ declare const env_simulation: typeof simulation;
19
+ declare namespace env {
20
+ export { env_push as push, env_simulation as simulation };
21
+ }
22
+
23
+ declare const purchase: Flow.StepExample;
24
+ declare const lead: Flow.StepExample;
25
+ declare const purchaseWithLiFatId: Flow.StepExample;
26
+
27
+ declare const step_lead: typeof lead;
28
+ declare const step_purchase: typeof purchase;
29
+ declare const step_purchaseWithLiFatId: typeof purchaseWithLiFatId;
30
+ declare namespace step {
31
+ export { step_lead as lead, step_purchase as purchase, step_purchaseWithLiFatId as purchaseWithLiFatId };
32
+ }
33
+
34
+ export { env, step };
@@ -0,0 +1,34 @@
1
+ import { DestinationServer, sendServer } from '@walkeros/server-core';
2
+ import { Flow } from '@walkeros/core';
3
+
4
+ interface Env extends DestinationServer.Env {
5
+ sendServer?: typeof sendServer;
6
+ }
7
+
8
+ /**
9
+ * Standard mock environment for push operations
10
+ *
11
+ * Use this for testing LinkedIn Conversions API events without making
12
+ * actual HTTP requests to LinkedIn's servers.
13
+ */
14
+ declare const push: Env;
15
+ declare const simulation: string[];
16
+
17
+ declare const env_push: typeof push;
18
+ declare const env_simulation: typeof simulation;
19
+ declare namespace env {
20
+ export { env_push as push, env_simulation as simulation };
21
+ }
22
+
23
+ declare const purchase: Flow.StepExample;
24
+ declare const lead: Flow.StepExample;
25
+ declare const purchaseWithLiFatId: Flow.StepExample;
26
+
27
+ declare const step_lead: typeof lead;
28
+ declare const step_purchase: typeof purchase;
29
+ declare const step_purchaseWithLiFatId: typeof purchaseWithLiFatId;
30
+ declare namespace step {
31
+ export { step_lead as lead, step_purchase as purchase, step_purchaseWithLiFatId as purchaseWithLiFatId };
32
+ }
33
+
34
+ export { env, step };