@walkeros/server-destination-meta 1.0.5 → 1.0.6-next-1771257332985

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.
Files changed (2) hide show
  1. package/dist/walkerOS.json +185 -0
  2. package/package.json +15 -7
@@ -0,0 +1,185 @@
1
+ {
2
+ "$meta": {
3
+ "package": "@walkeros/server-destination-meta",
4
+ "version": "1.0.5",
5
+ "type": "destination",
6
+ "platform": "server"
7
+ },
8
+ "schemas": {
9
+ "mapping": {
10
+ "$schema": "http://json-schema.org/draft-07/schema#",
11
+ "type": "object",
12
+ "properties": {},
13
+ "additionalProperties": false
14
+ },
15
+ "settings": {
16
+ "$schema": "http://json-schema.org/draft-07/schema#",
17
+ "type": "object",
18
+ "properties": {
19
+ "accessToken": {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "description": "Meta access token for Conversions API authentication (like your_access_token)"
23
+ },
24
+ "pixelId": {
25
+ "type": "string",
26
+ "pattern": "^[0-9]+$",
27
+ "description": "Meta Pixel ID from your Facebook Business account (like 1234567890)"
28
+ },
29
+ "action_source": {
30
+ "type": "string",
31
+ "enum": [
32
+ "email",
33
+ "website",
34
+ "app",
35
+ "phone_call",
36
+ "chat",
37
+ "physical_store",
38
+ "system_generated",
39
+ "business_messaging",
40
+ "other"
41
+ ],
42
+ "description": "Source of the event (website, app, phone_call, etc.) (like website)"
43
+ },
44
+ "doNotHash": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "string"
48
+ },
49
+ "description": "Array of user_data fields that should not be hashed (like ['client_ip_address', 'client_user_agent'])"
50
+ },
51
+ "test_event_code": {
52
+ "type": "string",
53
+ "description": "Test event code for debugging Meta Conversions API events (like TEST12345)"
54
+ },
55
+ "url": {
56
+ "type": "string",
57
+ "format": "uri",
58
+ "description": "Custom URL for Meta Conversions API endpoint (like https://graph.facebook.com/v17.0)"
59
+ },
60
+ "user_data": {
61
+ "type": "object",
62
+ "propertyNames": {
63
+ "type": "string"
64
+ },
65
+ "additionalProperties": {
66
+ "type": "string"
67
+ },
68
+ "description": "Mapping configuration for user data fields (like { email: 'user.email', phone: 'user.phone' })"
69
+ }
70
+ },
71
+ "required": [
72
+ "accessToken",
73
+ "pixelId"
74
+ ],
75
+ "additionalProperties": false
76
+ }
77
+ },
78
+ "examples": {
79
+ "env": {
80
+ "push": {
81
+ "sendServer": {
82
+ "$code": "async function(e,t,a){return{ok:!0,data:{events_received:1,messages:[],fbtrace_id:\"mock-trace-id\"}}}"
83
+ }
84
+ },
85
+ "simulation": [
86
+ "sendServer"
87
+ ]
88
+ },
89
+ "events": {
90
+ "Purchase": {
91
+ "$code": "function h(){const e=g(\"order complete\");return{data:[{event_name:\"Purchase\",event_time:e.timestamp/1e3,event_id:e.id,event_source_url:e.source.id,action_source:\"website\",user_data:{external_id:[\"cc8e27118413234d4297ed00a02711365312c79325df9b5b8f4199cbd0b96e7e\",\"9176e6f336dbdb4f99b0e45cbd7e41e0e2323812b236822842a61ffbd362ac8c\"]},order_id:String(e.data.id),currency:\"EUR\",value:Number(e.data.total),contents:e.nested.filter(e=>\"product\"===e.entity).map(e=>({id:String(e.data.id),quantity:Number(e.data.quantity)||1,item_price:Number(e.data.price)})),num_items:2}]}}"
92
+ }
93
+ },
94
+ "mapping": {
95
+ "InitUserData": {
96
+ "pixelId": "p1x3l1d",
97
+ "accessToken": "s3cr3t",
98
+ "user_data": {
99
+ "external_id": {
100
+ "set": [
101
+ "user.device",
102
+ "user.session"
103
+ ]
104
+ }
105
+ }
106
+ },
107
+ "Purchase": {
108
+ "name": "Purchase",
109
+ "data": {
110
+ "map": {
111
+ "order_id": "data.id",
112
+ "currency": {
113
+ "key": "data.currency",
114
+ "value": "EUR"
115
+ },
116
+ "value": "data.total",
117
+ "contents": {
118
+ "loop": [
119
+ "nested",
120
+ {
121
+ "condition": {
122
+ "$code": "e=>y(e)&&\"product\"===e.entity"
123
+ },
124
+ "map": {
125
+ "id": "data.id",
126
+ "item_price": "data.price",
127
+ "quantity": {
128
+ "key": "data.quantity",
129
+ "value": 1
130
+ }
131
+ }
132
+ }
133
+ ]
134
+ },
135
+ "num_items": {
136
+ "fn": {
137
+ "$code": "e=>e.nested.filter(e=>\"product\"===e.entity).length"
138
+ }
139
+ }
140
+ }
141
+ }
142
+ },
143
+ "config": {
144
+ "order": {
145
+ "complete": {
146
+ "name": "Purchase",
147
+ "data": {
148
+ "map": {
149
+ "order_id": "data.id",
150
+ "currency": {
151
+ "key": "data.currency",
152
+ "value": "EUR"
153
+ },
154
+ "value": "data.total",
155
+ "contents": {
156
+ "loop": [
157
+ "nested",
158
+ {
159
+ "condition": {
160
+ "$code": "e=>y(e)&&\"product\"===e.entity"
161
+ },
162
+ "map": {
163
+ "id": "data.id",
164
+ "item_price": "data.price",
165
+ "quantity": {
166
+ "key": "data.quantity",
167
+ "value": 1
168
+ }
169
+ }
170
+ }
171
+ ]
172
+ },
173
+ "num_items": {
174
+ "fn": {
175
+ "$code": "e=>e.nested.filter(e=>\"product\"===e.entity).length"
176
+ }
177
+ }
178
+ }
179
+ }
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/server-destination-meta",
3
3
  "description": "Meta server destination for walkerOS",
4
- "version": "1.0.5",
4
+ "version": "1.0.6-next-1771257332985",
5
5
  "license": "MIT",
6
6
  "exports": {
7
7
  ".": {
@@ -27,15 +27,18 @@
27
27
  "build": "tsup --silent",
28
28
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
29
29
  "dev": "jest --watchAll --colors",
30
- "lint": "tsc && eslint \"**/*.ts*\"",
30
+ "typecheck": "tsc --noEmit",
31
+ "lint": "eslint \"**/*.ts*\"",
31
32
  "test": "jest",
32
33
  "update": "npx npm-check-updates -u && npm update"
33
34
  },
34
35
  "dependencies": {
35
- "@walkeros/core": "1.3.0",
36
- "@walkeros/server-core": "1.0.5"
36
+ "@walkeros/core": "1.4.0-next-1771257332985",
37
+ "@walkeros/server-core": "1.0.6-next-1771257332985"
38
+ },
39
+ "devDependencies": {
40
+ "@walkeros/collector": "1.3.0-next-1771257332985"
37
41
  },
38
- "devDependencies": {},
39
42
  "repository": {
40
43
  "url": "git+https://github.com/elbwalker/walkerOS.git",
41
44
  "directory": "packages/server/destinations/meta"
@@ -45,13 +48,18 @@
45
48
  "bugs": {
46
49
  "url": "https://github.com/elbwalker/walkerOS/issues"
47
50
  },
51
+ "walkerOS": {
52
+ "type": "destination",
53
+ "platform": "server"
54
+ },
48
55
  "keywords": [
49
- "walker",
50
56
  "walkerOS",
57
+ "walkerOS-destination",
51
58
  "destination",
52
59
  "server",
53
60
  "meta",
54
- "capi"
61
+ "capi",
62
+ "analytics"
55
63
  ],
56
64
  "funding": [
57
65
  {