@classytic/notifications 0.0.1 → 1.2.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,37 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@classytic/notifications` will be documented in this file.
4
+
5
+ ## [1.1.0] - 2026-02-24
6
+
7
+ ### Added
8
+
9
+ - **EmailChannel** — Send email notifications via Nodemailer (SMTP, Gmail, SES, any transport)
10
+ - Lazy nodemailer import (zero overhead if unused)
11
+ - Pre-created transporter support for SES and custom transports
12
+ - `verify()` method for SMTP connection health checks
13
+ - `close()` method for graceful shutdown
14
+ - Attachments, CC/BCC, reply-to, custom `from` per-send
15
+ - **EmailChannel types** — `EmailChannelConfig`, `SmtpTransportOptions`, `EmailAttachment`, `NodemailerTransporter`
16
+ - **`QuietHoursConfig` type export** — Now available for consumers using `isQuietHours()` directly
17
+
18
+ ## [1.0.0] - 2026-02-20
19
+
20
+ ### Added
21
+
22
+ - **NotificationService** — Central orchestrator with send, batch send, hook factories, and lifecycle events
23
+ - **WebhookChannel** — HTTP POST/PUT with HMAC-SHA256 signing, custom headers, timeout (zero deps, native fetch)
24
+ - **ConsoleChannel** — Logs to console for development and testing
25
+ - **BaseChannel** — Abstract base class with event filtering and wildcard support (`user.*`)
26
+ - **Templates** — Pluggable template resolver (React Email, MJML, Handlebars, etc.)
27
+ - **Retry + Backoff** — Exponential, linear, or fixed backoff with jitter; per-channel overrides
28
+ - **User Preferences** — Per-user, per-event, per-channel opt-in/out with quiet hours
29
+ - **Quiet Hours** — Timezone-aware quiet period enforcement via `Intl.DateTimeFormat` (zero deps)
30
+ - **Idempotency** — Built-in deduplication with pluggable stores (memory default, Redis/DB via interface)
31
+ - **Batch Sending** — Worker-pool concurrency (`pMap`) with progress callback
32
+ - **Lifecycle Events** — `before:send` (fail-fast), `after:send`, `send:success`, `send:failed`, `send:retry`
33
+ - **Hook Factories** — `createHooks()` + `mergeHooks()` for EventEmitter/MongoKit/custom integration
34
+ - **Error Classes** — `NotificationError`, `ChannelError`, `ProviderNotInstalledError`
35
+ - **Utilities** — `withRetry`, `calculateDelay`, `resolveRetryConfig`, `Emitter`, `pMap`, `isQuietHours`, `MemoryIdempotencyStore`
36
+ - Full TypeScript types with ESM-only output
37
+ - Zero required dependencies (nodemailer is optional peer)