@astralibx/email-analytics 2.0.0 → 2.0.1
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 +17 -17
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -55,18 +55,18 @@ const overview = await analytics.query.getOverview(
|
|
|
55
55
|
|
|
56
56
|
## Features
|
|
57
57
|
|
|
58
|
-
- **Event Recording** -- single and batch insert with automatic timestamps ([docs](docs/event-recording.md))
|
|
59
|
-
- **Daily Aggregation** -- rolls up raw events into per-day stats by account, rule, template, and overall ([docs](docs/aggregation.md))
|
|
60
|
-
- **Range Aggregation** -- backfill or re-aggregate any date range ([docs](docs/aggregation.md))
|
|
61
|
-
- **Time-Series Queries** -- overview, timeline (daily/weekly/monthly), per-account, per-rule, per-template ([docs](docs/querying.md))
|
|
62
|
-
- **REST API** -- six endpoints with date-range query params ([docs](docs/api-routes.md))
|
|
63
|
-
- **TTL Cleanup** -- MongoDB TTL index auto-expires old events; manual purge also available ([docs](docs/event-recording.md#ttl-and-cleanup))
|
|
64
|
-
- **Programmatic API** -- use services directly without HTTP ([docs](docs/programmatic-api.md))
|
|
65
|
-
- **Error Handling** -- typed error classes for validation, date range, and aggregation failures ([docs](docs/error-handling.md))
|
|
58
|
+
- **Event Recording** -- single and batch insert with automatic timestamps ([docs](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/event-recording.md))
|
|
59
|
+
- **Daily Aggregation** -- rolls up raw events into per-day stats by account, rule, template, and overall ([docs](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/aggregation.md))
|
|
60
|
+
- **Range Aggregation** -- backfill or re-aggregate any date range ([docs](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/aggregation.md))
|
|
61
|
+
- **Time-Series Queries** -- overview, timeline (daily/weekly/monthly), per-account, per-rule, per-template ([docs](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/querying.md))
|
|
62
|
+
- **REST API** -- six endpoints with date-range query params ([docs](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/api-routes.md))
|
|
63
|
+
- **TTL Cleanup** -- MongoDB TTL index auto-expires old events; manual purge also available ([docs](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/event-recording.md#ttl-and-cleanup))
|
|
64
|
+
- **Programmatic API** -- use services directly without HTTP ([docs](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/programmatic-api.md))
|
|
65
|
+
- **Error Handling** -- typed error classes for validation, date range, and aggregation failures ([docs](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/error-handling.md))
|
|
66
66
|
|
|
67
67
|
## Integration with Other Packages
|
|
68
68
|
|
|
69
|
-
Wire hooks from `@astralibx/email-account-manager` and `@astralibx/email-rule-engine` to automatically record analytics events. See the [integration guide](docs/integration.md) for full examples.
|
|
69
|
+
Wire hooks from `@astralibx/email-account-manager` and `@astralibx/email-rule-engine` to automatically record analytics events. See the [integration guide](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/integration.md) for full examples.
|
|
70
70
|
|
|
71
71
|
```typescript
|
|
72
72
|
import { createEmailAccountManager } from '@astralibx/email-account-manager';
|
|
@@ -103,14 +103,14 @@ ruleEngine.on('emailFailed', async (detail) => {
|
|
|
103
103
|
|
|
104
104
|
| Guide | Description |
|
|
105
105
|
|-------|-------------|
|
|
106
|
-
| [Configuration](docs/configuration.md) | Full config reference |
|
|
107
|
-
| [Event Recording](docs/event-recording.md) | Recording events, batch insert, TTL |
|
|
108
|
-
| [Aggregation](docs/aggregation.md) | Daily aggregation, range backfill |
|
|
109
|
-
| [Querying](docs/querying.md) | Overview, timeline, grouped stats |
|
|
110
|
-
| [API Routes](docs/api-routes.md) | REST endpoints reference |
|
|
111
|
-
| [Programmatic API](docs/programmatic-api.md) | Using services directly |
|
|
112
|
-
| [Integration](docs/integration.md) | Wiring with account-manager and rule-engine |
|
|
113
|
-
| [Error Handling](docs/error-handling.md) | Error classes and codes |
|
|
106
|
+
| [Configuration](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/configuration.md) | Full config reference |
|
|
107
|
+
| [Event Recording](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/event-recording.md) | Recording events, batch insert, TTL |
|
|
108
|
+
| [Aggregation](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/aggregation.md) | Daily aggregation, range backfill |
|
|
109
|
+
| [Querying](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/querying.md) | Overview, timeline, grouped stats |
|
|
110
|
+
| [API Routes](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/api-routes.md) | REST endpoints reference |
|
|
111
|
+
| [Programmatic API](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/programmatic-api.md) | Using services directly |
|
|
112
|
+
| [Integration](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/integration.md) | Wiring with account-manager and rule-engine |
|
|
113
|
+
| [Error Handling](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-analytics/docs/error-handling.md) | Error classes and codes |
|
|
114
114
|
|
|
115
115
|
## Exported Types
|
|
116
116
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astralibx/email-analytics",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Email analytics with event recording, aggregation, time-series, and querying",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"test:watch": "vitest",
|
|
28
28
|
"test:coverage": "vitest run --coverage",
|
|
29
29
|
"lint": "eslint src/",
|
|
30
|
-
"prepublishOnly": "npm run build",
|
|
31
30
|
"clean": "rm -rf dist"
|
|
32
31
|
},
|
|
33
32
|
"keywords": [
|