@walkeros/server-destination-api 4.1.0-next-1778668930820 → 4.1.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/CHANGELOG.md ADDED
@@ -0,0 +1,305 @@
1
+ # @walkeros/server-destination-api
2
+
3
+ ## 4.1.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [e155ff8]
8
+ - Updated dependencies [e800974]
9
+ - Updated dependencies [e155ff8]
10
+ - Updated dependencies [1a8f2d7]
11
+ - Updated dependencies [1a8f2d7]
12
+ - Updated dependencies [b276173]
13
+ - Updated dependencies [dd9f5ad]
14
+ - Updated dependencies [c60ef35]
15
+ - Updated dependencies [adeebea]
16
+ - Updated dependencies [13aaeaa]
17
+ - Updated dependencies [e800974]
18
+ - Updated dependencies [adeebea]
19
+ - Updated dependencies [e800974]
20
+ - Updated dependencies [e800974]
21
+ - Updated dependencies [058f7ed]
22
+ - Updated dependencies [28a8ac2]
23
+ - Updated dependencies [fd6076e]
24
+ - @walkeros/core@4.1.0
25
+ - @walkeros/server-core@4.1.0
26
+
27
+ ## 4.0.2
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [a6a0ea7]
32
+ - @walkeros/core@4.0.2
33
+ - @walkeros/server-core@4.0.2
34
+
35
+ ## 4.0.1
36
+
37
+ ### Patch Changes
38
+
39
+ - Updated dependencies [381dfe7]
40
+ - Updated dependencies [1524275]
41
+ - Updated dependencies [03d7055]
42
+ - @walkeros/core@4.0.1
43
+ - @walkeros/server-core@4.0.1
44
+
45
+ ## 4.0.0
46
+
47
+ ### Major Changes
48
+
49
+ - 93ea9c4: Event model v4: breaking changes to the `Event`, `Source`, and
50
+ `Entity` shapes.
51
+ - `event.id` is now a W3C span_id (16 lowercase hex chars), generated by the
52
+ collector. Reference: W3C Trace Context (W3C Recommendation, January 2020).
53
+ - `event.version`, `event.group`, `event.count` are removed.
54
+ - `source.type` is now the source kind (e.g. `browser`, `gtag`, `mcp`, `cli`).
55
+ New `source.platform` holds the runtime (`web` | `server` | `app` | ...).
56
+ - `source.id` and `source.previous_id` are removed.
57
+ - Browser source now sets `source.url` and `source.referrer`.
58
+ - MCP source sets `source.tool` per emission. CLI source sets
59
+ `source.command`.
60
+ - `Entity.nested` and `Entity.context` are now optional. Root `event.nested`
61
+ and `event.context` remain required.
62
+ - Each source self-registers via TypeScript module augmentation of `SourceMap`
63
+ in `@walkeros/core`.
64
+ - App-side coordination (`/workspaces/developer/app`) is a follow-up plan, not
65
+ part of this release. Telemetry from v4 CLI/MCP will not validate against
66
+ the existing app schema until that follow-up ships.
67
+ - `Mapping.Rule.skip` is renamed to `Mapping.Rule.silent`. Customer flow.json
68
+ configs using `skip: true` in mapping rules must rename to `silent: true`.
69
+ Hard cut: no legacy alias, the field is gone.
70
+
71
+ ### Patch Changes
72
+
73
+ - Updated dependencies [93ea9c4]
74
+ - Updated dependencies [465775c]
75
+ - Updated dependencies [942a7fe]
76
+ - Updated dependencies [cfc7469]
77
+ - Updated dependencies [8e06b1f]
78
+ - Updated dependencies [3d50dd6]
79
+ - Updated dependencies [1ef33d9]
80
+ - @walkeros/core@4.0.0
81
+ - @walkeros/server-core@4.0.0
82
+
83
+ ## 3.4.2
84
+
85
+ ### Patch Changes
86
+
87
+ - @walkeros/core@3.4.2
88
+ - @walkeros/server-core@3.4.2
89
+
90
+ ## 3.4.1
91
+
92
+ ### Patch Changes
93
+
94
+ - Updated dependencies [12adf24]
95
+ - Updated dependencies [75aa26b]
96
+ - @walkeros/core@3.4.1
97
+ - @walkeros/server-core@3.4.1
98
+
99
+ ## 3.4.0
100
+
101
+ ### Minor Changes
102
+
103
+ - 724f97e: Migrate every step example in every walkerOS package to the
104
+ standardized `[callable, ...args][]` shape introduced in `@walkeros/core`.
105
+ Every step example's `out` is now an array of effect tuples whose first
106
+ element is the callable's public SDK name (`'gtag'`, `'analytics.track'`,
107
+ `'fbq'`, `'dataLayer.push'`, `'sendServer'`, `'fetch'`, `'trackClient.track'`,
108
+ `'amplitude.track'`, `'fs.writeFile'`, `'producer.send'`, `'client.xadd'`,
109
+ `'client.send'`, `'dataset.table.insert'`, etc.). Source examples use `'elb'`
110
+ as the callable; transformer examples use the reserved `'return'` keyword;
111
+ store examples use store-operation callables (`'get'`, `'set'`). Tests capture
112
+ real calls on each component's spy and assert against `example.out` directly —
113
+ the hardcoded `PACKAGE_CALLS` registry in the app is no longer consulted
114
+ (emptied; plan #3 removes it structurally).
115
+
116
+ ### Patch Changes
117
+
118
+ - Updated dependencies [74940cc]
119
+ - Updated dependencies [525f5d9]
120
+ - @walkeros/core@3.4.0
121
+ - @walkeros/server-core@3.4.0
122
+
123
+ ## 3.3.1
124
+
125
+ ### Patch Changes
126
+
127
+ - @walkeros/server-core@3.3.1
128
+ - @walkeros/core@3.3.1
129
+
130
+ ## 3.3.0
131
+
132
+ ### Patch Changes
133
+
134
+ - Updated dependencies [2849acb]
135
+ - Updated dependencies [08c365a]
136
+ - Updated dependencies [08c365a]
137
+ - Updated dependencies [08c365a]
138
+ - Updated dependencies [08c365a]
139
+ - @walkeros/core@3.3.0
140
+ - @walkeros/server-core@3.3.0
141
+
142
+ ## 3.2.0
143
+
144
+ ### Patch Changes
145
+
146
+ - Updated dependencies [eb865e1]
147
+ - Updated dependencies [c0a53f9]
148
+ - Updated dependencies [f007c9f]
149
+ - Updated dependencies [bf2dc5b]
150
+ - Updated dependencies [da0b640]
151
+ - @walkeros/core@3.2.0
152
+ - @walkeros/server-core@3.2.0
153
+
154
+ ## 3.1.1
155
+
156
+ ### Patch Changes
157
+
158
+ - @walkeros/core@3.1.1
159
+ - @walkeros/server-core@3.1.1
160
+
161
+ ## 3.1.0
162
+
163
+ ### Patch Changes
164
+
165
+ - Updated dependencies [dfc6738]
166
+ - Updated dependencies [966342b]
167
+ - Updated dependencies [bee8ba7]
168
+ - Updated dependencies [966342b]
169
+ - Updated dependencies [df990d4]
170
+ - @walkeros/core@3.1.0
171
+ - @walkeros/server-core@3.1.0
172
+
173
+ ## 3.0.2
174
+
175
+ ### Patch Changes
176
+
177
+ - @walkeros/core@3.0.2
178
+ - @walkeros/server-core@3.0.2
179
+
180
+ ## 3.0.1
181
+
182
+ ### Patch Changes
183
+
184
+ - @walkeros/core@3.0.1
185
+ - @walkeros/server-core@3.0.1
186
+
187
+ ## 3.0.0
188
+
189
+ ### Patch Changes
190
+
191
+ - 499e27a: Add sideEffects declarations to all packages for bundler tree-shaking
192
+ support.
193
+ - Updated dependencies [2b259b6]
194
+ - Updated dependencies [2614014]
195
+ - Updated dependencies [6ae0ee3]
196
+ - Updated dependencies [37299a9]
197
+ - Updated dependencies [499e27a]
198
+ - Updated dependencies [0e5eede]
199
+ - Updated dependencies [d11f574]
200
+ - Updated dependencies [d11f574]
201
+ - Updated dependencies [1fe337a]
202
+ - Updated dependencies [5cb84c1]
203
+ - Updated dependencies [23f218a]
204
+ - Updated dependencies [499e27a]
205
+ - Updated dependencies [c83d909]
206
+ - Updated dependencies [b6c8fa8]
207
+ - @walkeros/core@3.0.0
208
+ - @walkeros/server-core@3.0.0
209
+
210
+ ## 2.1.1
211
+
212
+ ### Patch Changes
213
+
214
+ - Updated dependencies [fab477d]
215
+ - @walkeros/core@2.1.1
216
+ - @walkeros/server-core@2.1.1
217
+
218
+ ## 2.1.0
219
+
220
+ ### Minor Changes
221
+
222
+ - 97df0b2: Step examples: upgrade all packages to blueprint pattern with inline
223
+ mapping, no intermediate variables, no `all` export
224
+
225
+ ### Patch Changes
226
+
227
+ - Updated dependencies [7fc4cee]
228
+ - Updated dependencies [7fc4cee]
229
+ - Updated dependencies [cb2da05]
230
+ - Updated dependencies [2bbe8c8]
231
+ - Updated dependencies [3eb6416]
232
+ - Updated dependencies [02a7958]
233
+ - Updated dependencies [97df0b2]
234
+ - Updated dependencies [97df0b2]
235
+ - Updated dependencies [026c412]
236
+ - Updated dependencies [7d38d9d]
237
+ - @walkeros/core@2.1.0
238
+ - @walkeros/server-core@2.1.0
239
+
240
+ ## 2.0.1
241
+
242
+ ## 1.0.6
243
+
244
+ ### Patch Changes
245
+
246
+ - Updated dependencies [7b2d750]
247
+ - @walkeros/core@1.4.0
248
+ - @walkeros/server-core@2.0.0
249
+
250
+ ## 1.0.5
251
+
252
+ ### Patch Changes
253
+
254
+ - Updated dependencies [a4cc1ea]
255
+ - @walkeros/core@1.3.0
256
+ - @walkeros/server-core@1.0.5
257
+
258
+ ## 1.0.4
259
+
260
+ ### Patch Changes
261
+
262
+ - Updated dependencies [7ad6cfb]
263
+ - @walkeros/core@1.2.2
264
+ - @walkeros/server-core@1.0.4
265
+
266
+ ## 1.0.3
267
+
268
+ ### Patch Changes
269
+
270
+ - Updated dependencies [6256c12]
271
+ - @walkeros/core@1.2.1
272
+ - @walkeros/server-core@1.0.3
273
+
274
+ ## 1.0.2
275
+
276
+ ### Patch Changes
277
+
278
+ - Updated dependencies [f39d9fb]
279
+ - Updated dependencies [888bbdf]
280
+ - @walkeros/core@1.2.0
281
+ - @walkeros/server-core@1.0.2
282
+
283
+ ## 1.0.1
284
+
285
+ ### Patch Changes
286
+
287
+ - Updated dependencies [b65b773]
288
+ - Updated dependencies [20eca6e]
289
+ - @walkeros/core@1.1.0
290
+ - @walkeros/server-core@1.0.1
291
+
292
+ ## 1.0.0
293
+
294
+ ### Major Changes
295
+
296
+ - 67c9e1d: Hello World! walkerOS v1.0.0
297
+
298
+ Open-source event data collection. Collect event data for digital analytics in
299
+ a unified and privacy-centric way.
300
+
301
+ ### Patch Changes
302
+
303
+ - Updated dependencies [67c9e1d]
304
+ - @walkeros/core@1.0.0
305
+ - @walkeros/server-core@1.0.0
package/README.md CHANGED
@@ -4,147 +4,41 @@
4
4
  </a>
5
5
  </p>
6
6
 
7
- # API Destination for walkerOS
7
+ # @walkeros/server-destination-api
8
8
 
9
- [Source Code](https://github.com/elbwalker/walkerOS/tree/main/packages/server/destinations/api)
10
- &bull;
11
- [NPM Package](https://www.npmjs.com/package/@walkeros/server-destination-api)
9
+ Server-side HTTP API destination for Node.js.
12
10
 
13
- walkerOS follows a **source → collector → destination** architecture. This API
14
- destination receives processed events from the walkerOS collector and sends them
15
- to any HTTP(S) endpoint, enabling integration with custom APIs, webhooks, and
16
- third-party services.
11
+ [Documentation](https://www.walkeros.io/docs/destinations/api/server) &bull;
12
+ [NPM Package](https://www.npmjs.com/package/@walkeros/server-destination-api)
13
+ &bull;
14
+ [Source Code](https://github.com/elbwalker/walkerOS/tree/main/packages/server/destinations/api)
17
15
 
18
16
  ## Installation
19
17
 
20
- ```sh
18
+ ```bash
21
19
  npm install @walkeros/server-destination-api
22
20
  ```
23
21
 
24
- ## Quick Start
25
-
26
- Configure in your Flow JSON:
22
+ ## Quick start
27
23
 
28
24
  ```json
29
25
  {
30
- "version": 3,
26
+ "version": 4,
31
27
  "flows": {
32
28
  "default": {
33
- "server": {},
29
+ "config": { "platform": "server" },
34
30
  "destinations": {
35
- "api": {
36
- "package": "@walkeros/server-destination-api",
37
- "config": {
38
- "settings": {
39
- "url": "https://api.example.com/events"
40
- }
41
- }
42
- }
31
+ "api": { "package": "@walkeros/server-destination-api", "config": {} }
43
32
  }
44
33
  }
45
34
  }
46
35
  }
47
36
  ```
48
37
 
49
- Or programmatically:
50
-
51
- ```typescript
52
- import { startFlow } from '@walkeros/collector';
53
- import { destinationAPI } from '@walkeros/server-destination-api';
54
-
55
- const { elb } = await startFlow({
56
- destinations: [
57
- {
58
- destination: destinationAPI,
59
- config: {
60
- settings: {
61
- url: 'https://api.example.com/events',
62
- headers: {
63
- Authorization: 'Bearer your-api-key',
64
- 'Content-Type': 'application/json',
65
- },
66
- method: 'POST',
67
- timeout: 5000,
68
- },
69
- },
70
- },
71
- ],
72
- });
73
- ```
74
-
75
- ## Configuration
76
-
77
- | Name | Type | Description | Required | Default |
78
- | ----------- | ------------------------ | ----------------------------------- | -------- | ------- |
79
- | `url` | `string` | The API endpoint URL to send events | Yes | - |
80
- | `headers` | `Record<string, string>` | Custom HTTP headers | No | - |
81
- | `method` | `string` | HTTP method | No | `POST` |
82
- | `timeout` | `number` | Request timeout in milliseconds | No | `5000` |
83
- | `transform` | `Function` | Custom data transformation function | No | - |
84
-
85
- ## Features
86
-
87
- - **Flexible URL Configuration**: Send events to any HTTP(S) endpoint
88
- - **Custom Headers**: Add authentication tokens, API keys, or custom headers
89
- - **HTTP Method Control**: Use POST, PUT, PATCH, or any HTTP method
90
- - **Request Timeout**: Configure timeout for slow endpoints
91
- - **Data Transformation**: Transform event data before sending with custom
92
- functions
93
- - **Dependency Injection**: Mock the sendServer function for testing
94
-
95
- ## Advanced Usage
96
-
97
- ### Custom Transform Function
98
-
99
- Transform event data before sending:
100
-
101
- ```typescript
102
- import { destinationAPI } from '@walkeros/server-destination-api';
103
-
104
- const config = {
105
- settings: {
106
- url: 'https://api.example.com/events',
107
- transform: (data, config, mapping) => {
108
- // Return custom body (string or object)
109
- return JSON.stringify({
110
- eventType: data.event,
111
- properties: data.data,
112
- timestamp: Date.now(),
113
- });
114
- },
115
- },
116
- };
117
- ```
118
-
119
- ### Using with Mapping
120
-
121
- Use walkerOS mapping to transform events:
122
-
123
- ```typescript
124
- const config = {
125
- settings: { url: 'https://api.example.com/events' },
126
- mapping: {
127
- page: {
128
- view: {
129
- data: {
130
- map: {
131
- pageUrl: 'data.path',
132
- pageTitle: 'data.title',
133
- },
134
- },
135
- },
136
- },
137
- },
138
- };
139
- ```
140
-
141
- ## Type Definitions
142
-
143
- See [src/types/](./src/types/) for TypeScript interfaces.
144
-
145
- ## Related
38
+ ## Documentation
146
39
 
147
- - [Destination Interface](../../../core/src/types/destination.ts)
40
+ Full configuration, mapping, and examples live in the docs:
41
+ **https://www.walkeros.io/docs/destinations/api/server**
148
42
 
149
43
  ## Contribute
150
44
 
@@ -155,4 +49,4 @@ Feel free to contribute by submitting an
155
49
 
156
50
  ## License
157
51
 
158
- This project is licensed under the MIT License.
52
+ MIT
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$meta": {
3
3
  "package": "@walkeros/server-destination-api",
4
- "version": "4.1.0-next-1778668930820",
4
+ "version": "4.1.0",
5
5
  "type": "destination",
6
6
  "platform": [
7
7
  "server"
@@ -95,7 +95,7 @@
95
95
  "consent": {
96
96
  "functional": true
97
97
  },
98
- "id": "d3259ac1ee7d6033",
98
+ "id": "5b006fa2d2b4e79d",
99
99
  "trigger": "test",
100
100
  "entity": "form",
101
101
  "action": "submit",
@@ -198,7 +198,7 @@
198
198
  "consent": {
199
199
  "functional": true
200
200
  },
201
- "id": "59dfea2de510e141",
201
+ "id": "551fbeac8a2d6786",
202
202
  "trigger": "load",
203
203
  "entity": "order",
204
204
  "action": "complete",
@@ -266,7 +266,7 @@
266
266
  "consent": {
267
267
  "functional": true
268
268
  },
269
- "id": "111e51d4dadd93fe",
269
+ "id": "5baeeb192e7a3626",
270
270
  "trigger": "load",
271
271
  "entity": "page",
272
272
  "action": "view",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/server-destination-api",
3
3
  "description": "API server destination for walkerOS",
4
- "version": "4.1.0-next-1778668930820",
4
+ "version": "4.1.0",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -25,7 +25,8 @@
25
25
  }
26
26
  },
27
27
  "files": [
28
- "dist/**"
28
+ "dist/**",
29
+ "CHANGELOG.md"
29
30
  ],
30
31
  "scripts": {
31
32
  "build": "tsup --silent",
@@ -37,8 +38,8 @@
37
38
  "update": "npx npm-check-updates -u && npm update"
38
39
  },
39
40
  "dependencies": {
40
- "@walkeros/core": "4.1.0-next-1778668930820",
41
- "@walkeros/server-core": "4.1.0-next-1778668930820"
41
+ "@walkeros/core": "4.1.0",
42
+ "@walkeros/server-core": "4.1.0"
42
43
  },
43
44
  "devDependencies": {},
44
45
  "repository": {