@walkeros/server-destination-datamanager 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dev.d.mts ADDED
@@ -0,0 +1,165 @@
1
+ import { JSONSchema } from '@walkeros/core/dev';
2
+ import { Mapping as Mapping$1, Destination as Destination$1 } from '@walkeros/core';
3
+ import { DestinationServer } from '@walkeros/server-core';
4
+
5
+ declare const schemas$1: Record<string, JSONSchema>;
6
+
7
+ declare namespace schemas {
8
+ export { schemas$1 as schemas };
9
+ }
10
+
11
+ type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
12
+
13
+ interface Settings {
14
+ /** OAuth 2.0 access token with datamanager scope */
15
+ accessToken: string;
16
+ /** Array of destination accounts and conversion actions/user lists */
17
+ destinations: Destination[];
18
+ /** Default event source if not specified per event */
19
+ eventSource?: EventSource;
20
+ /** Maximum number of events to batch before sending (max 2000) */
21
+ batchSize?: number;
22
+ /** Time in milliseconds to wait before auto-flushing batch */
23
+ batchInterval?: number;
24
+ /** If true, validate request without ingestion (testing mode) */
25
+ validateOnly?: boolean;
26
+ /** Override API endpoint (for testing) */
27
+ url?: string;
28
+ /** Request-level consent for all events */
29
+ consent?: Consent;
30
+ /** Test event code for debugging (optional) */
31
+ testEventCode?: string;
32
+ /** Log level for debugging (optional) */
33
+ logLevel?: LogLevel;
34
+ /** Guided helpers: User data mapping (applies to all events) */
35
+ userData?: Mapping$1.Map;
36
+ /** Guided helper: First-party user ID */
37
+ userId?: Mapping$1.Value;
38
+ /** Guided helper: GA4 client ID */
39
+ clientId?: Mapping$1.Value;
40
+ /** Guided helper: Privacy-safe attribution (Google's sessionAttributes) */
41
+ sessionAttributes?: Mapping$1.Value;
42
+ /** Consent mapping: Map consent field to adUserData (string = field name, boolean = static value) */
43
+ consentAdUserData?: string | boolean;
44
+ /** Consent mapping: Map consent field to adPersonalization (string = field name, boolean = static value) */
45
+ consentAdPersonalization?: string | boolean;
46
+ }
47
+ interface Mapping {
48
+ gclid?: Mapping$1.Value;
49
+ gbraid?: Mapping$1.Value;
50
+ wbraid?: Mapping$1.Value;
51
+ sessionAttributes?: Mapping$1.Value;
52
+ }
53
+ interface Env extends DestinationServer.Env {
54
+ fetch?: typeof fetch;
55
+ }
56
+ type Types = Destination$1.Types<Settings, Mapping, Env>;
57
+ type Config = {
58
+ settings: Settings;
59
+ } & DestinationServer.Config<Types>;
60
+ type Rule = Mapping$1.Rule<Mapping>;
61
+ /**
62
+ * Destination account and product identifier
63
+ * https://developers.google.com/data-manager/api/reference/rest/v1/Destination
64
+ */
65
+ interface Destination {
66
+ /** Operating account details */
67
+ operatingAccount: OperatingAccount;
68
+ /** Product-specific destination ID (conversion action or user list) */
69
+ productDestinationId: string;
70
+ }
71
+ /**
72
+ * Operating account information
73
+ */
74
+ interface OperatingAccount {
75
+ /** Account ID (e.g., "123-456-7890" for Google Ads) */
76
+ accountId: string;
77
+ /** Type of account */
78
+ accountType: AccountType;
79
+ }
80
+ type AccountType = 'GOOGLE_ADS' | 'DISPLAY_VIDEO_ADVERTISER' | 'DISPLAY_VIDEO_PARTNER' | 'GOOGLE_ANALYTICS_PROPERTY';
81
+ type EventSource = 'WEB' | 'APP' | 'IN_STORE' | 'PHONE' | 'OTHER';
82
+ /**
83
+ * Consent for Digital Markets Act (DMA) compliance
84
+ * https://developers.google.com/data-manager/api/devguides/concepts/dma
85
+ */
86
+ interface Consent {
87
+ /** Consent for data collection and use */
88
+ adUserData?: ConsentStatus;
89
+ /** Consent for ad personalization */
90
+ adPersonalization?: ConsentStatus;
91
+ }
92
+ type ConsentStatus = 'CONSENT_GRANTED' | 'CONSENT_DENIED';
93
+
94
+ /**
95
+ * Purchase event mapping for Google Ads conversion
96
+ */
97
+ declare const Purchase: Rule;
98
+ /**
99
+ * Lead event mapping
100
+ */
101
+ declare const Lead: Rule;
102
+ /**
103
+ * Page view mapping for GA4
104
+ */
105
+ declare const PageView: Rule;
106
+ /**
107
+ * Complete mapping configuration
108
+ */
109
+ declare const mapping: {
110
+ order: {
111
+ complete: Rule;
112
+ };
113
+ lead: {
114
+ submit: Rule;
115
+ };
116
+ page: {
117
+ view: Rule;
118
+ };
119
+ };
120
+ /**
121
+ * User data mapping configuration
122
+ * Maps walkerOS user properties to Data Manager user identifiers
123
+ */
124
+ declare const userDataMapping: Config;
125
+
126
+ declare const mapping$1_Lead: typeof Lead;
127
+ declare const mapping$1_PageView: typeof PageView;
128
+ declare const mapping$1_Purchase: typeof Purchase;
129
+ declare const mapping$1_mapping: typeof mapping;
130
+ declare const mapping$1_userDataMapping: typeof userDataMapping;
131
+ declare namespace mapping$1 {
132
+ export { mapping$1_Lead as Lead, mapping$1_PageView as PageView, mapping$1_Purchase as Purchase, mapping$1_mapping as mapping, mapping$1_userDataMapping as userDataMapping };
133
+ }
134
+
135
+ /**
136
+ * Minimal configuration for Google Data Manager
137
+ */
138
+ declare const minimal: Config;
139
+ /**
140
+ * Complete configuration with all options
141
+ */
142
+ declare const complete: Config;
143
+ /**
144
+ * GA4-specific configuration
145
+ */
146
+ declare const ga4: Config;
147
+ /**
148
+ * Debug configuration with logging enabled
149
+ */
150
+ declare const debug: Config;
151
+
152
+ declare const basic_complete: typeof complete;
153
+ declare const basic_debug: typeof debug;
154
+ declare const basic_ga4: typeof ga4;
155
+ declare const basic_minimal: typeof minimal;
156
+ declare namespace basic {
157
+ export { basic_complete as complete, basic_debug as debug, basic_ga4 as ga4, basic_minimal as minimal };
158
+ }
159
+
160
+ declare const index_basic: typeof basic;
161
+ declare namespace index {
162
+ export { index_basic as basic, mapping$1 as mapping };
163
+ }
164
+
165
+ export { index as examples, schemas };
package/dist/dev.d.ts ADDED
@@ -0,0 +1,165 @@
1
+ import { JSONSchema } from '@walkeros/core/dev';
2
+ import { Mapping as Mapping$1, Destination as Destination$1 } from '@walkeros/core';
3
+ import { DestinationServer } from '@walkeros/server-core';
4
+
5
+ declare const schemas$1: Record<string, JSONSchema>;
6
+
7
+ declare namespace schemas {
8
+ export { schemas$1 as schemas };
9
+ }
10
+
11
+ type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
12
+
13
+ interface Settings {
14
+ /** OAuth 2.0 access token with datamanager scope */
15
+ accessToken: string;
16
+ /** Array of destination accounts and conversion actions/user lists */
17
+ destinations: Destination[];
18
+ /** Default event source if not specified per event */
19
+ eventSource?: EventSource;
20
+ /** Maximum number of events to batch before sending (max 2000) */
21
+ batchSize?: number;
22
+ /** Time in milliseconds to wait before auto-flushing batch */
23
+ batchInterval?: number;
24
+ /** If true, validate request without ingestion (testing mode) */
25
+ validateOnly?: boolean;
26
+ /** Override API endpoint (for testing) */
27
+ url?: string;
28
+ /** Request-level consent for all events */
29
+ consent?: Consent;
30
+ /** Test event code for debugging (optional) */
31
+ testEventCode?: string;
32
+ /** Log level for debugging (optional) */
33
+ logLevel?: LogLevel;
34
+ /** Guided helpers: User data mapping (applies to all events) */
35
+ userData?: Mapping$1.Map;
36
+ /** Guided helper: First-party user ID */
37
+ userId?: Mapping$1.Value;
38
+ /** Guided helper: GA4 client ID */
39
+ clientId?: Mapping$1.Value;
40
+ /** Guided helper: Privacy-safe attribution (Google's sessionAttributes) */
41
+ sessionAttributes?: Mapping$1.Value;
42
+ /** Consent mapping: Map consent field to adUserData (string = field name, boolean = static value) */
43
+ consentAdUserData?: string | boolean;
44
+ /** Consent mapping: Map consent field to adPersonalization (string = field name, boolean = static value) */
45
+ consentAdPersonalization?: string | boolean;
46
+ }
47
+ interface Mapping {
48
+ gclid?: Mapping$1.Value;
49
+ gbraid?: Mapping$1.Value;
50
+ wbraid?: Mapping$1.Value;
51
+ sessionAttributes?: Mapping$1.Value;
52
+ }
53
+ interface Env extends DestinationServer.Env {
54
+ fetch?: typeof fetch;
55
+ }
56
+ type Types = Destination$1.Types<Settings, Mapping, Env>;
57
+ type Config = {
58
+ settings: Settings;
59
+ } & DestinationServer.Config<Types>;
60
+ type Rule = Mapping$1.Rule<Mapping>;
61
+ /**
62
+ * Destination account and product identifier
63
+ * https://developers.google.com/data-manager/api/reference/rest/v1/Destination
64
+ */
65
+ interface Destination {
66
+ /** Operating account details */
67
+ operatingAccount: OperatingAccount;
68
+ /** Product-specific destination ID (conversion action or user list) */
69
+ productDestinationId: string;
70
+ }
71
+ /**
72
+ * Operating account information
73
+ */
74
+ interface OperatingAccount {
75
+ /** Account ID (e.g., "123-456-7890" for Google Ads) */
76
+ accountId: string;
77
+ /** Type of account */
78
+ accountType: AccountType;
79
+ }
80
+ type AccountType = 'GOOGLE_ADS' | 'DISPLAY_VIDEO_ADVERTISER' | 'DISPLAY_VIDEO_PARTNER' | 'GOOGLE_ANALYTICS_PROPERTY';
81
+ type EventSource = 'WEB' | 'APP' | 'IN_STORE' | 'PHONE' | 'OTHER';
82
+ /**
83
+ * Consent for Digital Markets Act (DMA) compliance
84
+ * https://developers.google.com/data-manager/api/devguides/concepts/dma
85
+ */
86
+ interface Consent {
87
+ /** Consent for data collection and use */
88
+ adUserData?: ConsentStatus;
89
+ /** Consent for ad personalization */
90
+ adPersonalization?: ConsentStatus;
91
+ }
92
+ type ConsentStatus = 'CONSENT_GRANTED' | 'CONSENT_DENIED';
93
+
94
+ /**
95
+ * Purchase event mapping for Google Ads conversion
96
+ */
97
+ declare const Purchase: Rule;
98
+ /**
99
+ * Lead event mapping
100
+ */
101
+ declare const Lead: Rule;
102
+ /**
103
+ * Page view mapping for GA4
104
+ */
105
+ declare const PageView: Rule;
106
+ /**
107
+ * Complete mapping configuration
108
+ */
109
+ declare const mapping: {
110
+ order: {
111
+ complete: Rule;
112
+ };
113
+ lead: {
114
+ submit: Rule;
115
+ };
116
+ page: {
117
+ view: Rule;
118
+ };
119
+ };
120
+ /**
121
+ * User data mapping configuration
122
+ * Maps walkerOS user properties to Data Manager user identifiers
123
+ */
124
+ declare const userDataMapping: Config;
125
+
126
+ declare const mapping$1_Lead: typeof Lead;
127
+ declare const mapping$1_PageView: typeof PageView;
128
+ declare const mapping$1_Purchase: typeof Purchase;
129
+ declare const mapping$1_mapping: typeof mapping;
130
+ declare const mapping$1_userDataMapping: typeof userDataMapping;
131
+ declare namespace mapping$1 {
132
+ export { mapping$1_Lead as Lead, mapping$1_PageView as PageView, mapping$1_Purchase as Purchase, mapping$1_mapping as mapping, mapping$1_userDataMapping as userDataMapping };
133
+ }
134
+
135
+ /**
136
+ * Minimal configuration for Google Data Manager
137
+ */
138
+ declare const minimal: Config;
139
+ /**
140
+ * Complete configuration with all options
141
+ */
142
+ declare const complete: Config;
143
+ /**
144
+ * GA4-specific configuration
145
+ */
146
+ declare const ga4: Config;
147
+ /**
148
+ * Debug configuration with logging enabled
149
+ */
150
+ declare const debug: Config;
151
+
152
+ declare const basic_complete: typeof complete;
153
+ declare const basic_debug: typeof debug;
154
+ declare const basic_ga4: typeof ga4;
155
+ declare const basic_minimal: typeof minimal;
156
+ declare namespace basic {
157
+ export { basic_complete as complete, basic_debug as debug, basic_ga4 as ga4, basic_minimal as minimal };
158
+ }
159
+
160
+ declare const index_basic: typeof basic;
161
+ declare namespace index {
162
+ export { index_basic as basic, mapping$1 as mapping };
163
+ }
164
+
165
+ export { index as examples, schemas };
package/dist/dev.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";var e,t=Object.defineProperty,a=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i=(e,a)=>{for(var n in a)t(e,n,{get:a[n],enumerable:!0})},r={};i(r,{examples:()=>y,schemas:()=>s}),module.exports=(e=r,((e,i,r,s)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let c of n(i))o.call(e,c)||c===r||t(e,c,{get:()=>i[c],enumerable:!(s=a(i,c))||s.enumerable});return e})(t({},"__esModule",{value:!0}),e));var s={};i(s,{schemas:()=>A});var c=require("@walkeros/core/dev"),d=c.z.enum(["GOOGLE_ADS","DISPLAY_VIDEO_ADVERTISER","DISPLAY_VIDEO_PARTNER","GOOGLE_ANALYTICS_PROPERTY"]),l=c.z.enum(["WEB","APP","IN_STORE","PHONE","OTHER"]),u=c.z.enum(["CONSENT_GRANTED","CONSENT_DENIED"]),p=c.z.object({adUserData:u.describe("Consent for data collection and use").optional(),adPersonalization:u.describe("Consent for ad personalization").optional()}),m=c.z.object({accountId:c.z.string().min(1).describe('Account ID (e.g., "123-456-7890" for Google Ads)'),accountType:d.describe("Type of account")}),g=c.z.object({operatingAccount:m.describe("Operating account details"),productDestinationId:c.z.string().min(1).describe("Product-specific destination ID (conversion action or user list)")}),b=require("@walkeros/core/dev"),v=b.z.object({accessToken:b.z.string().min(1).describe("OAuth 2.0 access token with datamanager scope (like ya29.c.xxx)"),destinations:b.z.array(g).min(1).max(10).describe("Array of destination accounts and conversion actions/user lists (max 10)"),eventSource:l.describe("Default event source if not specified per event (like WEB)").optional(),batchSize:b.z.number().int().min(1).max(2e3).describe("Maximum number of events to batch before sending (max 2000, like 100)").optional(),batchInterval:b.z.number().int().min(0).describe("Time in milliseconds to wait before auto-flushing batch (like 5000)").optional(),validateOnly:b.z.boolean().describe("If true, validate request without ingestion (testing mode)").optional(),url:b.z.string().url().describe("Override API endpoint for testing (like https://datamanager.googleapis.com/v1)").optional(),consent:p.describe("Request-level consent for all events").optional(),testEventCode:b.z.string().describe("Test event code for debugging (like TEST12345)").optional(),logLevel:b.z.enum(["debug","info","warn","error","none"]).describe("Log level for debugging (debug shows all API calls)").optional(),userData:b.z.record(b.z.string(),b.z.unknown()).describe("Guided helper: User data mapping for all events (like { email: 'user.id', phone: 'data.phone' })").optional(),userId:b.z.any().describe("Guided helper: First-party user ID for all events (like 'user.id')").optional(),clientId:b.z.any().describe("Guided helper: GA4 client ID for all events (like 'user.device')").optional(),sessionAttributes:b.z.any().describe("Guided helper: Privacy-safe attribution for all events (like 'context.sessionAttributes')").optional(),consentAdUserData:b.z.union([b.z.string(),b.z.boolean()]).describe("Consent mapping: Field name from event.consent (like 'marketing') or static boolean value").optional(),consentAdPersonalization:b.z.union([b.z.string(),b.z.boolean()]).describe("Consent mapping: Field name from event.consent (like 'targeting') or static boolean value").optional()}),O=require("@walkeros/core/dev").z.object({}),I=require("@walkeros/core/dev"),A={settings:(0,I.zodToSchema)(v),mapping:(0,I.zodToSchema)(O)},y={};i(y,{basic:()=>S,mapping:()=>z});var z={};i(z,{Lead:()=>N,PageView:()=>D,Purchase:()=>f,mapping:()=>T,userDataMapping:()=>h});var E=require("@walkeros/core"),f={name:"purchase",data:{map:{transactionId:"data.id",conversionValue:"data.total",currency:{key:"data.currency",value:"USD"},eventName:{value:"purchase"},userId:"user.id",email:"user.id",gclid:"context.gclid",gbraid:"context.gbraid",wbraid:"context.wbraid",cartData:{map:{items:{loop:["nested",{condition:e=>(0,E.isObject)(e)&&"product"===e.entity,map:{merchantProductId:"data.id",price:"data.price",quantity:{key:"data.quantity",value:1}}}]}}}}}},N={name:"generate_lead",data:{map:{eventName:{value:"generate_lead"},conversionValue:{value:10},currency:{value:"USD"}}}},D={name:"page_view",data:{map:{eventName:{value:"page_view"}}}},T={order:{complete:f},lead:{submit:N},page:{view:D}},h={settings:{accessToken:"ya29.c.xxx",destinations:[{operatingAccount:{accountId:"123-456-7890",accountType:"GOOGLE_ADS"},productDestinationId:"AW-CONVERSION-123"}]},data:{map:{email:"user.id",phone:"data.phone",firstName:"data.firstName",lastName:"data.lastName",regionCode:"data.country",postalCode:"data.zip"}},mapping:T},S={};i(S,{complete:()=>k,debug:()=>P,ga4:()=>G,minimal:()=>x});var x={settings:{accessToken:"ya29.c.xxx",destinations:[{operatingAccount:{accountId:"123-456-7890",accountType:"GOOGLE_ADS"},productDestinationId:"AW-CONVERSION-123"}]}},k={settings:{accessToken:"ya29.c.xxx",destinations:[{operatingAccount:{accountId:"123-456-7890",accountType:"GOOGLE_ADS"},productDestinationId:"AW-CONVERSION-123"},{operatingAccount:{accountId:"987654321",accountType:"GOOGLE_ANALYTICS_PROPERTY"},productDestinationId:"G-XXXXXXXXXX"}],eventSource:"WEB",batchSize:100,batchInterval:5e3,validateOnly:!1,consent:{adUserData:"CONSENT_GRANTED",adPersonalization:"CONSENT_GRANTED"},userData:{email:"user.id",phone:"data.phone",firstName:"data.firstName",lastName:"data.lastName"},userId:"user.id",clientId:"user.device",sessionAttributes:"context.sessionAttributes"},data:{map:{eventSource:{value:"WEB"}}}},G={settings:{accessToken:"ya29.c.xxx",destinations:[{operatingAccount:{accountId:"123456789",accountType:"GOOGLE_ANALYTICS_PROPERTY"},productDestinationId:"G-XXXXXXXXXX"}],eventSource:"WEB"}},P={settings:{accessToken:"ya29.c.xxx",destinations:[{operatingAccount:{accountId:"123-456-7890",accountType:"GOOGLE_ADS"},productDestinationId:"AW-CONVERSION-123"}],logLevel:"debug"}};//# sourceMappingURL=dev.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dev.ts","../src/schemas.ts","../src/schemas/primitives.ts","../src/schemas/settings.ts","../src/schemas/mapping.ts","../src/schemas/index.ts","../src/examples/index.ts","../src/examples/mapping.ts","../src/examples/basic.ts"],"sourcesContent":["export * as schemas from './schemas';\nexport * as examples from './examples';\n","// Browser-safe schema-only exports\n// This file exports ONLY schemas without any Node.js dependencies\nimport { schemas } from './schemas/index';\n\nexport { schemas };\n","import { z } from '@walkeros/core/dev';\n\nexport const AccountTypeSchema = z.enum([\n 'GOOGLE_ADS',\n 'DISPLAY_VIDEO_ADVERTISER',\n 'DISPLAY_VIDEO_PARTNER',\n 'GOOGLE_ANALYTICS_PROPERTY',\n]);\n\nexport const EventSourceSchema = z.enum([\n 'WEB',\n 'APP',\n 'IN_STORE',\n 'PHONE',\n 'OTHER',\n]);\n\nexport const ConsentStatusSchema = z.enum([\n 'CONSENT_GRANTED',\n 'CONSENT_DENIED',\n]);\n\nexport const ConsentSchema = z.object({\n adUserData: ConsentStatusSchema.describe(\n 'Consent for data collection and use',\n ).optional(),\n adPersonalization: ConsentStatusSchema.describe(\n 'Consent for ad personalization',\n ).optional(),\n});\n\nexport const OperatingAccountSchema = z.object({\n accountId: z\n .string()\n .min(1)\n .describe('Account ID (e.g., \"123-456-7890\" for Google Ads)'),\n accountType: AccountTypeSchema.describe('Type of account'),\n});\n\nexport const DestinationSchema = z.object({\n operatingAccount: OperatingAccountSchema.describe(\n 'Operating account details',\n ),\n productDestinationId: z\n .string()\n .min(1)\n .describe(\n 'Product-specific destination ID (conversion action or user list)',\n ),\n});\n","import { z } from '@walkeros/core/dev';\nimport {\n DestinationSchema,\n EventSourceSchema,\n ConsentSchema,\n} from './primitives';\n\nexport const SettingsSchema = z.object({\n accessToken: z\n .string()\n .min(1)\n .describe(\n 'OAuth 2.0 access token with datamanager scope (like ya29.c.xxx)',\n ),\n destinations: z\n .array(DestinationSchema)\n .min(1)\n .max(10)\n .describe(\n 'Array of destination accounts and conversion actions/user lists (max 10)',\n ),\n eventSource: EventSourceSchema.describe(\n 'Default event source if not specified per event (like WEB)',\n ).optional(),\n batchSize: z\n .number()\n .int()\n .min(1)\n .max(2000)\n .describe(\n 'Maximum number of events to batch before sending (max 2000, like 100)',\n )\n .optional(),\n batchInterval: z\n .number()\n .int()\n .min(0)\n .describe(\n 'Time in milliseconds to wait before auto-flushing batch (like 5000)',\n )\n .optional(),\n validateOnly: z\n .boolean()\n .describe('If true, validate request without ingestion (testing mode)')\n .optional(),\n url: z\n .string()\n .url()\n .describe(\n 'Override API endpoint for testing (like https://datamanager.googleapis.com/v1)',\n )\n .optional(),\n consent: ConsentSchema.describe(\n 'Request-level consent for all events',\n ).optional(),\n testEventCode: z\n .string()\n .describe('Test event code for debugging (like TEST12345)')\n .optional(),\n logLevel: z\n .enum(['debug', 'info', 'warn', 'error', 'none'])\n .describe('Log level for debugging (debug shows all API calls)')\n .optional(),\n userData: z\n .record(z.string(), z.unknown())\n .describe(\n \"Guided helper: User data mapping for all events (like { email: 'user.id', phone: 'data.phone' })\",\n )\n .optional(),\n userId: z\n .any()\n .describe(\n \"Guided helper: First-party user ID for all events (like 'user.id')\",\n )\n .optional(),\n clientId: z\n .any()\n .describe(\n \"Guided helper: GA4 client ID for all events (like 'user.device')\",\n )\n .optional(),\n sessionAttributes: z\n .any()\n .describe(\n \"Guided helper: Privacy-safe attribution for all events (like 'context.sessionAttributes')\",\n )\n .optional(),\n consentAdUserData: z\n .union([z.string(), z.boolean()])\n .describe(\n \"Consent mapping: Field name from event.consent (like 'marketing') or static boolean value\",\n )\n .optional(),\n consentAdPersonalization: z\n .union([z.string(), z.boolean()])\n .describe(\n \"Consent mapping: Field name from event.consent (like 'targeting') or static boolean value\",\n )\n .optional(),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\n// Data Manager uses flexible mapping via walkerOS mapping system\n// No event-specific mapping schema needed (similar to Meta CAPI pattern)\nexport const MappingSchema = z.object({});\n\nexport type Mapping = z.infer<typeof MappingSchema>;\n","export * from './primitives';\nexport * from './settings';\nexport * from './mapping';\n\nimport { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\nimport { MappingSchema } from './mapping';\n\nimport type { JSONSchema } from '@walkeros/core/dev';\n\nexport const schemas: Record<string, JSONSchema> = {\n settings: zodToSchema(SettingsSchema),\n mapping: zodToSchema(MappingSchema),\n};\n","export * as mapping from './mapping';\nexport * as basic from './basic';\n","import type { DestinationDataManager } from '..';\nimport { isObject } from '@walkeros/core';\n\n/**\n * Purchase event mapping for Google Ads conversion\n */\nexport const Purchase: DestinationDataManager.Rule = {\n name: 'purchase',\n data: {\n map: {\n // Required fields\n transactionId: 'data.id',\n conversionValue: 'data.total',\n currency: { key: 'data.currency', value: 'USD' },\n eventName: { value: 'purchase' },\n\n // User identification\n userId: 'user.id',\n email: 'user.id', // Will be hashed automatically\n\n // Attribution identifiers (captured by browser source from URL)\n gclid: 'context.gclid', // Google Click ID\n gbraid: 'context.gbraid', // iOS attribution\n wbraid: 'context.wbraid', // Web-to-app\n\n // Shopping cart data\n cartData: {\n map: {\n items: {\n loop: [\n 'nested',\n {\n condition: (entity) =>\n isObject(entity) && entity.entity === 'product',\n map: {\n merchantProductId: 'data.id',\n price: 'data.price',\n quantity: { key: 'data.quantity', value: 1 },\n },\n },\n ],\n },\n },\n },\n },\n },\n};\n\n/**\n * Lead event mapping\n */\nexport const Lead: DestinationDataManager.Rule = {\n name: 'generate_lead',\n data: {\n map: {\n eventName: { value: 'generate_lead' },\n conversionValue: { value: 10 },\n currency: { value: 'USD' },\n },\n },\n};\n\n/**\n * Page view mapping for GA4\n */\nexport const PageView: DestinationDataManager.Rule = {\n name: 'page_view',\n data: {\n map: {\n eventName: { value: 'page_view' },\n },\n },\n};\n\n/**\n * Complete mapping configuration\n */\nexport const mapping = {\n order: {\n complete: Purchase,\n },\n lead: {\n submit: Lead,\n },\n page: {\n view: PageView,\n },\n} satisfies DestinationDataManager.Rules;\n\n/**\n * User data mapping configuration\n * Maps walkerOS user properties to Data Manager user identifiers\n */\nexport const userDataMapping: DestinationDataManager.Config = {\n settings: {\n accessToken: 'ya29.c.xxx',\n destinations: [\n {\n operatingAccount: {\n accountId: '123-456-7890',\n accountType: 'GOOGLE_ADS',\n },\n productDestinationId: 'AW-CONVERSION-123',\n },\n ],\n },\n data: {\n map: {\n email: 'user.id',\n phone: 'data.phone',\n firstName: 'data.firstName',\n lastName: 'data.lastName',\n regionCode: 'data.country',\n postalCode: 'data.zip',\n },\n },\n mapping,\n};\n","import type { DestinationDataManager } from '..';\n\n/**\n * Minimal configuration for Google Data Manager\n */\nexport const minimal: DestinationDataManager.Config = {\n settings: {\n accessToken: 'ya29.c.xxx',\n destinations: [\n {\n operatingAccount: {\n accountId: '123-456-7890',\n accountType: 'GOOGLE_ADS',\n },\n productDestinationId: 'AW-CONVERSION-123',\n },\n ],\n },\n};\n\n/**\n * Complete configuration with all options\n */\nexport const complete: DestinationDataManager.Config = {\n settings: {\n accessToken: 'ya29.c.xxx',\n destinations: [\n {\n operatingAccount: {\n accountId: '123-456-7890',\n accountType: 'GOOGLE_ADS',\n },\n productDestinationId: 'AW-CONVERSION-123',\n },\n {\n operatingAccount: {\n accountId: '987654321',\n accountType: 'GOOGLE_ANALYTICS_PROPERTY',\n },\n productDestinationId: 'G-XXXXXXXXXX',\n },\n ],\n eventSource: 'WEB',\n batchSize: 100,\n batchInterval: 5000,\n validateOnly: false,\n consent: {\n adUserData: 'CONSENT_GRANTED',\n adPersonalization: 'CONSENT_GRANTED',\n },\n\n // Guided helpers (apply to all events)\n userData: {\n email: 'user.id',\n phone: 'data.phone',\n firstName: 'data.firstName',\n lastName: 'data.lastName',\n },\n userId: 'user.id',\n clientId: 'user.device',\n sessionAttributes: 'context.sessionAttributes',\n },\n data: {\n map: {\n eventSource: { value: 'WEB' },\n },\n },\n};\n\n/**\n * GA4-specific configuration\n */\nexport const ga4: DestinationDataManager.Config = {\n settings: {\n accessToken: 'ya29.c.xxx',\n destinations: [\n {\n operatingAccount: {\n accountId: '123456789',\n accountType: 'GOOGLE_ANALYTICS_PROPERTY',\n },\n productDestinationId: 'G-XXXXXXXXXX',\n },\n ],\n eventSource: 'WEB',\n },\n};\n\n/**\n * Debug configuration with logging enabled\n */\nexport const debug: DestinationDataManager.Config = {\n settings: {\n accessToken: 'ya29.c.xxx',\n destinations: [\n {\n operatingAccount: {\n accountId: '123-456-7890',\n accountType: 'GOOGLE_ADS',\n },\n productDestinationId: 'AW-CONVERSION-123',\n },\n ],\n logLevel: 'debug', // Shows all API calls and responses\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;;;ACAA,iBAAkB;AAEX,IAAM,oBAAoB,aAAE,KAAK;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,IAAM,oBAAoB,aAAE,KAAK;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,IAAM,sBAAsB,aAAE,KAAK;AAAA,EACxC;AAAA,EACA;AACF,CAAC;AAEM,IAAM,gBAAgB,aAAE,OAA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AKO,IAAM,QAAuC;AAAA,EAClD,UAAU;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,MACZ;AAAA,QACE,kBAAkB;AAAA,UAChB,WAAW;AAAA,UACX,aAAa;AAAA,QACf;AAAA,QACA,sBAAsB;AAAA,MACxB;AAAA,IACF;AAAA,IACA,UAAU;AAAA;AAAA,EACZ;AACF;","names":["import_dev","import_dev","import_dev"]}
package/dist/dev.mjs ADDED
@@ -0,0 +1 @@
1
+ var e=Object.defineProperty,a=(a,t)=>{for(var n in t)e(a,n,{get:t[n],enumerable:!0})},t={};a(t,{schemas:()=>v});import{z as n}from"@walkeros/core/dev";var o=n.enum(["GOOGLE_ADS","DISPLAY_VIDEO_ADVERTISER","DISPLAY_VIDEO_PARTNER","GOOGLE_ANALYTICS_PROPERTY"]),i=n.enum(["WEB","APP","IN_STORE","PHONE","OTHER"]),s=n.enum(["CONSENT_GRANTED","CONSENT_DENIED"]),r=n.object({adUserData:s.describe("Consent for data collection and use").optional(),adPersonalization:s.describe("Consent for ad personalization").optional()}),c=n.object({accountId:n.string().min(1).describe('Account ID (e.g., "123-456-7890" for Google Ads)'),accountType:o.describe("Type of account")}),d=n.object({operatingAccount:c.describe("Operating account details"),productDestinationId:n.string().min(1).describe("Product-specific destination ID (conversion action or user list)")});import{z as l}from"@walkeros/core/dev";var u=l.object({accessToken:l.string().min(1).describe("OAuth 2.0 access token with datamanager scope (like ya29.c.xxx)"),destinations:l.array(d).min(1).max(10).describe("Array of destination accounts and conversion actions/user lists (max 10)"),eventSource:i.describe("Default event source if not specified per event (like WEB)").optional(),batchSize:l.number().int().min(1).max(2e3).describe("Maximum number of events to batch before sending (max 2000, like 100)").optional(),batchInterval:l.number().int().min(0).describe("Time in milliseconds to wait before auto-flushing batch (like 5000)").optional(),validateOnly:l.boolean().describe("If true, validate request without ingestion (testing mode)").optional(),url:l.string().url().describe("Override API endpoint for testing (like https://datamanager.googleapis.com/v1)").optional(),consent:r.describe("Request-level consent for all events").optional(),testEventCode:l.string().describe("Test event code for debugging (like TEST12345)").optional(),logLevel:l.enum(["debug","info","warn","error","none"]).describe("Log level for debugging (debug shows all API calls)").optional(),userData:l.record(l.string(),l.unknown()).describe("Guided helper: User data mapping for all events (like { email: 'user.id', phone: 'data.phone' })").optional(),userId:l.any().describe("Guided helper: First-party user ID for all events (like 'user.id')").optional(),clientId:l.any().describe("Guided helper: GA4 client ID for all events (like 'user.device')").optional(),sessionAttributes:l.any().describe("Guided helper: Privacy-safe attribution for all events (like 'context.sessionAttributes')").optional(),consentAdUserData:l.union([l.string(),l.boolean()]).describe("Consent mapping: Field name from event.consent (like 'marketing') or static boolean value").optional(),consentAdPersonalization:l.union([l.string(),l.boolean()]).describe("Consent mapping: Field name from event.consent (like 'targeting') or static boolean value").optional()});import{z as p}from"@walkeros/core/dev";var m=p.object({});import{zodToSchema as g}from"@walkeros/core/dev";var v={settings:g(u),mapping:g(m)},b={};a(b,{basic:()=>T,mapping:()=>I});var I={};a(I,{Lead:()=>E,PageView:()=>f,Purchase:()=>O,mapping:()=>N,userDataMapping:()=>D});import{isObject as A}from"@walkeros/core";var O={name:"purchase",data:{map:{transactionId:"data.id",conversionValue:"data.total",currency:{key:"data.currency",value:"USD"},eventName:{value:"purchase"},userId:"user.id",email:"user.id",gclid:"context.gclid",gbraid:"context.gbraid",wbraid:"context.wbraid",cartData:{map:{items:{loop:["nested",{condition:e=>A(e)&&"product"===e.entity,map:{merchantProductId:"data.id",price:"data.price",quantity:{key:"data.quantity",value:1}}}]}}}}}},E={name:"generate_lead",data:{map:{eventName:{value:"generate_lead"},conversionValue:{value:10},currency:{value:"USD"}}}},f={name:"page_view",data:{map:{eventName:{value:"page_view"}}}},N={order:{complete:O},lead:{submit:E},page:{view:f}},D={settings:{accessToken:"ya29.c.xxx",destinations:[{operatingAccount:{accountId:"123-456-7890",accountType:"GOOGLE_ADS"},productDestinationId:"AW-CONVERSION-123"}]},data:{map:{email:"user.id",phone:"data.phone",firstName:"data.firstName",lastName:"data.lastName",regionCode:"data.country",postalCode:"data.zip"}},mapping:N},T={};a(T,{complete:()=>x,debug:()=>h,ga4:()=>S,minimal:()=>y});var y={settings:{accessToken:"ya29.c.xxx",destinations:[{operatingAccount:{accountId:"123-456-7890",accountType:"GOOGLE_ADS"},productDestinationId:"AW-CONVERSION-123"}]}},x={settings:{accessToken:"ya29.c.xxx",destinations:[{operatingAccount:{accountId:"123-456-7890",accountType:"GOOGLE_ADS"},productDestinationId:"AW-CONVERSION-123"},{operatingAccount:{accountId:"987654321",accountType:"GOOGLE_ANALYTICS_PROPERTY"},productDestinationId:"G-XXXXXXXXXX"}],eventSource:"WEB",batchSize:100,batchInterval:5e3,validateOnly:!1,consent:{adUserData:"CONSENT_GRANTED",adPersonalization:"CONSENT_GRANTED"},userData:{email:"user.id",phone:"data.phone",firstName:"data.firstName",lastName:"data.lastName"},userId:"user.id",clientId:"user.device",sessionAttributes:"context.sessionAttributes"},data:{map:{eventSource:{value:"WEB"}}}},S={settings:{accessToken:"ya29.c.xxx",destinations:[{operatingAccount:{accountId:"123456789",accountType:"GOOGLE_ANALYTICS_PROPERTY"},productDestinationId:"G-XXXXXXXXXX"}],eventSource:"WEB"}},h={settings:{accessToken:"ya29.c.xxx",destinations:[{operatingAccount:{accountId:"123-456-7890",accountType:"GOOGLE_ADS"},productDestinationId:"AW-CONVERSION-123"}],logLevel:"debug"}};export{b as examples,t as schemas};//# sourceMappingURL=dev.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas.ts","../src/schemas/primitives.ts","../src/schemas/settings.ts","../src/schemas/mapping.ts","../src/schemas/index.ts","../src/examples/index.ts","../src/examples/mapping.ts","../src/examples/basic.ts"],"sourcesContent":["// Browser-safe schema-only exports\n// This file exports ONLY schemas without any Node.js dependencies\nimport { schemas } from './schemas/index';\n\nexport { schemas };\n","import { z } from '@walkeros/core/dev';\n\nexport const AccountTypeSchema = z.enum([\n 'GOOGLE_ADS',\n 'DISPLAY_VIDEO_ADVERTISER',\n 'DISPLAY_VIDEO_PARTNER',\n 'GOOGLE_ANALYTICS_PROPERTY',\n]);\n\nexport const EventSourceSchema = z.enum([\n 'WEB',\n 'APP',\n 'IN_STORE',\n 'PHONE',\n 'OTHER',\n]);\n\nexport const ConsentStatusSchema = z.enum([\n 'CONSENT_GRANTED',\n 'CONSENT_DENIED',\n]);\n\nexport const ConsentSchema = z.object({\n adUserData: ConsentStatusSchema.describe(\n 'Consent for data collection and use',\n ).optional(),\n adPersonalization: ConsentStatusSchema.describe(\n 'Consent for ad personalization',\n ).optional(),\n});\n\nexport const OperatingAccountSchema = z.object({\n accountId: z\n .string()\n .min(1)\n .describe('Account ID (e.g., \"123-456-7890\" for Google Ads)'),\n accountType: AccountTypeSchema.describe('Type of account'),\n});\n\nexport const DestinationSchema = z.object({\n operatingAccount: OperatingAccountSchema.describe(\n 'Operating account details',\n ),\n productDestinationId: z\n .string()\n .min(1)\n .describe(\n 'Product-specific destination ID (conversion action or user list)',\n ),\n});\n","import { z } from '@walkeros/core/dev';\nimport {\n DestinationSchema,\n EventSourceSchema,\n ConsentSchema,\n} from './primitives';\n\nexport const SettingsSchema = z.object({\n accessToken: z\n .string()\n .min(1)\n .describe(\n 'OAuth 2.0 access token with datamanager scope (like ya29.c.xxx)',\n ),\n destinations: z\n .array(DestinationSchema)\n .min(1)\n .max(10)\n .describe(\n 'Array of destination accounts and conversion actions/user lists (max 10)',\n ),\n eventSource: EventSourceSchema.describe(\n 'Default event source if not specified per event (like WEB)',\n ).optional(),\n batchSize: z\n .number()\n .int()\n .min(1)\n .max(2000)\n .describe(\n 'Maximum number of events to batch before sending (max 2000, like 100)',\n )\n .optional(),\n batchInterval: z\n .number()\n .int()\n .min(0)\n .describe(\n 'Time in milliseconds to wait before auto-flushing batch (like 5000)',\n )\n .optional(),\n validateOnly: z\n .boolean()\n .describe('If true, validate request without ingestion (testing mode)')\n .optional(),\n url: z\n .string()\n .url()\n .describe(\n 'Override API endpoint for testing (like https://datamanager.googleapis.com/v1)',\n )\n .optional(),\n consent: ConsentSchema.describe(\n 'Request-level consent for all events',\n ).optional(),\n testEventCode: z\n .string()\n .describe('Test event code for debugging (like TEST12345)')\n .optional(),\n logLevel: z\n .enum(['debug', 'info', 'warn', 'error', 'none'])\n .describe('Log level for debugging (debug shows all API calls)')\n .optional(),\n userData: z\n .record(z.string(), z.unknown())\n .describe(\n \"Guided helper: User data mapping for all events (like { email: 'user.id', phone: 'data.phone' })\",\n )\n .optional(),\n userId: z\n .any()\n .describe(\n \"Guided helper: First-party user ID for all events (like 'user.id')\",\n )\n .optional(),\n clientId: z\n .any()\n .describe(\n \"Guided helper: GA4 client ID for all events (like 'user.device')\",\n )\n .optional(),\n sessionAttributes: z\n .any()\n .describe(\n \"Guided helper: Privacy-safe attribution for all events (like 'context.sessionAttributes')\",\n )\n .optional(),\n consentAdUserData: z\n .union([z.string(), z.boolean()])\n .describe(\n \"Consent mapping: Field name from event.consent (like 'marketing') or static boolean value\",\n )\n .optional(),\n consentAdPersonalization: z\n .union([z.string(), z.boolean()])\n .describe(\n \"Consent mapping: Field name from event.consent (like 'targeting') or static boolean value\",\n )\n .optional(),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\n// Data Manager uses flexible mapping via walkerOS mapping system\n// No event-specific mapping schema needed (similar to Meta CAPI pattern)\nexport const MappingSchema = z.object({});\n\nexport type Mapping = z.infer<typeof MappingSchema>;\n","export * from './primitives';\nexport * from './settings';\nexport * from './mapping';\n\nimport { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\nimport { MappingSchema } from './mapping';\n\nimport type { JSONSchema } from '@walkeros/core/dev';\n\nexport const schemas: Record<string, JSONSchema> = {\n settings: zodToSchema(SettingsSchema),\n mapping: zodToSchema(MappingSchema),\n};\n","export * as mapping from './mapping';\nexport * as basic from './basic';\n","import type { DestinationDataManager } from '..';\nimport { isObject } from '@walkeros/core';\n\n/**\n * Purchase event mapping for Google Ads conversion\n */\nexport const Purchase: DestinationDataManager.Rule = {\n name: 'purchase',\n data: {\n map: {\n // Required fields\n transactionId: 'data.id',\n conversionValue: 'data.total',\n currency: { key: 'data.currency', value: 'USD' },\n eventName: { value: 'purchase' },\n\n // User identification\n userId: 'user.id',\n email: 'user.id', // Will be hashed automatically\n\n // Attribution identifiers (captured by browser source from URL)\n gclid: 'context.gclid', // Google Click ID\n gbraid: 'context.gbraid', // iOS attribution\n wbraid: 'context.wbraid', // Web-to-app\n\n // Shopping cart data\n cartData: {\n map: {\n items: {\n loop: [\n 'nested',\n {\n condition: (entity) =>\n isObject(entity) && entity.entity === 'product',\n map: {\n merchantProductId: 'data.id',\n price: 'data.price',\n quantity: { key: 'data.quantity', value: 1 },\n },\n },\n ],\n },\n },\n },\n },\n },\n};\n\n/**\n * Lead event mapping\n */\nexport const Lead: DestinationDataManager.Rule = {\n name: 'generate_lead',\n data: {\n map: {\n eventName: { value: 'generate_lead' },\n conversionValue: { value: 10 },\n currency: { value: 'USD' },\n },\n },\n};\n\n/**\n * Page view mapping for GA4\n */\nexport const PageView: DestinationDataManager.Rule = {\n name: 'page_view',\n data: {\n map: {\n eventName: { value: 'page_view' },\n },\n },\n};\n\n/**\n * Complete mapping configuration\n */\nexport const mapping = {\n order: {\n complete: Purchase,\n },\n lead: {\n submit: Lead,\n },\n page: {\n view: PageView,\n },\n} satisfies DestinationDataManager.Rules;\n\n/**\n * User data mapping configuration\n * Maps walkerOS user properties to Data Manager user identifiers\n */\nexport const userDataMapping: DestinationDataManager.Config = {\n settings: {\n accessToken: 'ya29.c.xxx',\n destinations: [\n {\n operatingAccount: {\n accountId: '123-456-7890',\n accountType: 'GOOGLE_ADS',\n },\n productDestinationId: 'AW-CONVERSION-123',\n },\n ],\n },\n data: {\n map: {\n email: 'user.id',\n phone: 'data.phone',\n firstName: 'data.firstName',\n lastName: 'data.lastName',\n regionCode: 'data.country',\n postalCode: 'data.zip',\n },\n },\n mapping,\n};\n","import type { DestinationDataManager } from '..';\n\n/**\n * Minimal configuration for Google Data Manager\n */\nexport const minimal: DestinationDataManager.Config = {\n settings: {\n accessToken: 'ya29.c.xxx',\n destinations: [\n {\n operatingAccount: {\n accountId: '123-456-7890',\n accountType: 'GOOGLE_ADS',\n },\n productDestinationId: 'AW-CONVERSION-123',\n },\n ],\n },\n};\n\n/**\n * Complete configuration with all options\n */\nexport const complete: DestinationDataManager.Config = {\n settings: {\n accessToken: 'ya29.c.xxx',\n destinations: [\n {\n operatingAccount: {\n accountId: '123-456-7890',\n accountType: 'GOOGLE_ADS',\n },\n productDestinationId: 'AW-CONVERSION-123',\n },\n {\n operatingAccount: {\n accountId: '987654321',\n accountType: 'GOOGLE_ANALYTICS_PROPERTY',\n },\n productDestinationId: 'G-XXXXXXXXXX',\n },\n ],\n eventSource: 'WEB',\n batchSize: 100,\n batchInterval: 5000,\n validateOnly: false,\n consent: {\n adUserData: 'CONSENT_GRANTED',\n adPersonalization: 'CONSENT_GRANTED',\n },\n\n // Guided helpers (apply to all events)\n userData: {\n email: 'user.id',\n phone: 'data.phone',\n firstName: 'data.firstName',\n lastName: 'data.lastName',\n },\n userId: 'user.id',\n clientId: 'user.device',\n sessionAttributes: 'context.sessionAttributes',\n },\n data: {\n map: {\n eventSource: { value: 'WEB' },\n },\n },\n};\n\n/**\n * GA4-specific configuration\n */\nexport const ga4: DestinationDataManager.Config = {\n settings: {\n accessToken: 'ya29.c.xxx',\n destinations: [\n {\n operatingAccount: {\n accountId: '123456789',\n accountType: 'GOOGLE_ANALYTICS_PROPERTY',\n },\n productDestinationId: 'G-XXXXXXXXXX',\n },\n ],\n eventSource: 'WEB',\n },\n};\n\n/**\n * Debug configuration with logging enabled\n */\nexport const debug: DestinationDataManager.Config = {\n settings: {\n accessToken: 'ya29.c.xxx',\n destinations: [\n {\n operatingAccount: {\n accountId: '123-456-7890',\n accountType: 'GOOGLE_ADS',\n },\n productDestinationId: 'AW-CONVERSION-123',\n },\n ],\n logLevel: 'debug', // Shows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A,IACZ;AAAA,IACA,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,mBAAmB;AAAA,EACrB;AAAA,EACA,MAAM;AAAA,IACJ,KAAK;AAAA,MACH,aAAa,EAAE,OAAO,MAAM;AAAA,IAC9B;AAAA,EACF;AACF;AAKO,IAAM,MAAqC;AAAA,EAChD,UAAU;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,MACZ;AAAA,QACE,kBAAkB;AAAA,UAChB,WAAW;AAAA,UACX,aAAa;AAAA,QACf;AAAA,QACA,sBAAsB;AAAA,MACxB;AAAA,IACF;AAAA,IACA,aAAa;AAAA,EACf;AACF;AAKO,IAAM,QAAuC;AAAA,EAClD,UAAU;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,MACZ;AAAA,QACE,kBAAkB;AAAA,UAChB,WAAW;AAAA,UACX,aAAa;AAAA,QACf;AAAA,QACA,sBAAsB;AAAA,MACxB;AAAA,IACF;AAAA,IACA,UAAU;AAAA;AAAA,EACZ;AACF;","names":["z","z","z"]}
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Destination as Destination$1, Mapping as Mapping$1, JSONSchema } from '@walkeros/core';
1
+ import { Destination as Destination$1, Mapping as Mapping$1 } from '@walkeros/core';
2
2
  import { DestinationServer } from '@walkeros/server-core';
3
3
 
4
4
  type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
@@ -255,118 +255,41 @@ interface RequestError {
255
255
  eventCount?: number;
256
256
  }
257
257
 
258
- type index$1_AccountType = AccountType;
259
- type index$1_AdIdentifiers = AdIdentifiers;
260
- type index$1_Address = Address;
261
- type index$1_CartData = CartData;
262
- type index$1_CartItem = CartItem;
263
- type index$1_Config = Config;
264
- type index$1_Consent = Consent;
265
- type index$1_ConsentStatus = ConsentStatus;
266
- type index$1_Destination = Destination;
267
- type index$1_DestinationInterface = DestinationInterface;
268
- type index$1_Env = Env;
269
- type index$1_Event = Event;
270
- type index$1_EventSource = EventSource;
271
- type index$1_IngestEventsRequest = IngestEventsRequest;
272
- type index$1_IngestEventsResponse = IngestEventsResponse;
273
- type index$1_InitFn = InitFn;
274
- type index$1_Mapping = Mapping;
275
- type index$1_OperatingAccount = OperatingAccount;
276
- type index$1_PartialConfig = PartialConfig;
277
- type index$1_PushEvents = PushEvents;
278
- type index$1_PushFn = PushFn;
279
- type index$1_RequestError = RequestError;
280
- type index$1_RequestState = RequestState;
281
- type index$1_RequestStatusResponse = RequestStatusResponse;
282
- type index$1_Rule = Rule;
283
- type index$1_Rules = Rules;
284
- type index$1_Settings = Settings;
285
- type index$1_Types = Types;
286
- type index$1_UserData = UserData;
287
- type index$1_UserIdentifier = UserIdentifier;
288
- type index$1_ValidationError = ValidationError;
289
- declare namespace index$1 {
290
- export type { index$1_AccountType as AccountType, index$1_AdIdentifiers as AdIdentifiers, index$1_Address as Address, index$1_CartData as CartData, index$1_CartItem as CartItem, index$1_Config as Config, index$1_Consent as Consent, index$1_ConsentStatus as ConsentStatus, index$1_Destination as Destination, index$1_DestinationInterface as DestinationInterface, index$1_Env as Env, index$1_Event as Event, index$1_EventSource as EventSource, index$1_IngestEventsRequest as IngestEventsRequest, index$1_IngestEventsResponse as IngestEventsResponse, index$1_InitFn as InitFn, index$1_Mapping as Mapping, index$1_OperatingAccount as OperatingAccount, index$1_PartialConfig as PartialConfig, index$1_PushEvents as PushEvents, index$1_PushFn as PushFn, index$1_RequestError as RequestError, index$1_RequestState as RequestState, index$1_RequestStatusResponse as RequestStatusResponse, index$1_Rule as Rule, index$1_Rules as Rules, index$1_Settings as Settings, index$1_Types as Types, index$1_UserData as UserData, index$1_UserIdentifier as UserIdentifier, index$1_ValidationError as ValidationError };
291
- }
292
-
293
- /**
294
- * Purchase event mapping for Google Ads conversion
295
- */
296
- declare const Purchase: Rule;
297
- /**
298
- * Lead event mapping
299
- */
300
- declare const Lead: Rule;
301
- /**
302
- * Page view mapping for GA4
303
- */
304
- declare const PageView: Rule;
305
- /**
306
- * Complete mapping configuration
307
- */
308
- declare const mapping: {
309
- order: {
310
- complete: Rule;
311
- };
312
- lead: {
313
- submit: Rule;
314
- };
315
- page: {
316
- view: Rule;
317
- };
318
- };
319
- /**
320
- * User data mapping configuration
321
- * Maps walkerOS user properties to Data Manager user identifiers
322
- */
323
- declare const userDataMapping: Config;
324
-
325
- declare const mapping$1_Lead: typeof Lead;
326
- declare const mapping$1_PageView: typeof PageView;
327
- declare const mapping$1_Purchase: typeof Purchase;
328
- declare const mapping$1_mapping: typeof mapping;
329
- declare const mapping$1_userDataMapping: typeof userDataMapping;
330
- declare namespace mapping$1 {
331
- export { mapping$1_Lead as Lead, mapping$1_PageView as PageView, mapping$1_Purchase as Purchase, mapping$1_mapping as mapping, mapping$1_userDataMapping as userDataMapping };
332
- }
333
-
334
- /**
335
- * Minimal configuration for Google Data Manager
336
- */
337
- declare const minimal: Config;
338
- /**
339
- * Complete configuration with all options
340
- */
341
- declare const complete: Config;
342
- /**
343
- * GA4-specific configuration
344
- */
345
- declare const ga4: Config;
346
- /**
347
- * Debug configuration with logging enabled
348
- */
349
- declare const debug: Config;
350
-
351
- declare const basic_complete: typeof complete;
352
- declare const basic_debug: typeof debug;
353
- declare const basic_ga4: typeof ga4;
354
- declare const basic_minimal: typeof minimal;
355
- declare namespace basic {
356
- export { basic_complete as complete, basic_debug as debug, basic_ga4 as ga4, basic_minimal as minimal };
357
- }
358
-
359
- declare const index_basic: typeof basic;
258
+ type index_AccountType = AccountType;
259
+ type index_AdIdentifiers = AdIdentifiers;
260
+ type index_Address = Address;
261
+ type index_CartData = CartData;
262
+ type index_CartItem = CartItem;
263
+ type index_Config = Config;
264
+ type index_Consent = Consent;
265
+ type index_ConsentStatus = ConsentStatus;
266
+ type index_Destination = Destination;
267
+ type index_DestinationInterface = DestinationInterface;
268
+ type index_Env = Env;
269
+ type index_Event = Event;
270
+ type index_EventSource = EventSource;
271
+ type index_IngestEventsRequest = IngestEventsRequest;
272
+ type index_IngestEventsResponse = IngestEventsResponse;
273
+ type index_InitFn = InitFn;
274
+ type index_Mapping = Mapping;
275
+ type index_OperatingAccount = OperatingAccount;
276
+ type index_PartialConfig = PartialConfig;
277
+ type index_PushEvents = PushEvents;
278
+ type index_PushFn = PushFn;
279
+ type index_RequestError = RequestError;
280
+ type index_RequestState = RequestState;
281
+ type index_RequestStatusResponse = RequestStatusResponse;
282
+ type index_Rule = Rule;
283
+ type index_Rules = Rules;
284
+ type index_Settings = Settings;
285
+ type index_Types = Types;
286
+ type index_UserData = UserData;
287
+ type index_UserIdentifier = UserIdentifier;
288
+ type index_ValidationError = ValidationError;
360
289
  declare namespace index {
361
- export { index_basic as basic, mapping$1 as mapping };
362
- }
363
-
364
- declare const schemas$1: Record<string, JSONSchema>;
365
-
366
- declare namespace schemas {
367
- export { schemas$1 as schemas };
290
+ export type { index_AccountType as AccountType, index_AdIdentifiers as AdIdentifiers, index_Address as Address, index_CartData as CartData, index_CartItem as CartItem, index_Config as Config, index_Consent as Consent, index_ConsentStatus as ConsentStatus, index_Destination as Destination, index_DestinationInterface as DestinationInterface, index_Env as Env, index_Event as Event, index_EventSource as EventSource, index_IngestEventsRequest as IngestEventsRequest, index_IngestEventsResponse as IngestEventsResponse, index_InitFn as InitFn, index_Mapping as Mapping, index_OperatingAccount as OperatingAccount, index_PartialConfig as PartialConfig, index_PushEvents as PushEvents, index_PushFn as PushFn, index_RequestError as RequestError, index_RequestState as RequestState, index_RequestStatusResponse as RequestStatusResponse, index_Rule as Rule, index_Rules as Rules, index_Settings as Settings, index_Types as Types, index_UserData as UserData, index_UserIdentifier as UserIdentifier, index_ValidationError as ValidationError };
368
291
  }
369
292
 
370
293
  declare const destinationDataManager: DestinationInterface;
371
294
 
372
- export { index$1 as DestinationDataManager, destinationDataManager as default, destinationDataManager, index as examples, schemas };
295
+ export { index as DestinationDataManager, destinationDataManager as default, destinationDataManager };